Skip to content

Commit e685ac3

Browse files
feat: enable FeatureGroup Service Account and IAM methods
PiperOrigin-RevId: 704910450 Source-Link: googleapis/googleapis@798bd23 Source-Link: googleapis/googleapis-gen@ff2b284 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQUlQbGF0Zm9ybS5WMUJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJmZjJiMjg0N2E0NzBhOWRlYTBkNjdjMTZiZjk3ODgyMzdjYTcxZmQ3In0=
1 parent 13dd39d commit e685ac3

File tree

2,331 files changed

+803536
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,331 files changed

+803536
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START aiplatform_v1beta1_generated_DatasetService_CreateDataset_async_flattened]
20+
using Google.Cloud.AIPlatform.V1Beta1;
21+
using Google.LongRunning;
22+
using System.Threading.Tasks;
23+
24+
public sealed partial class GeneratedDatasetServiceClientSnippets
25+
{
26+
/// <summary>Snippet for CreateDatasetAsync</summary>
27+
/// <remarks>
28+
/// This snippet has been automatically generated and should be regarded as a code template only.
29+
/// It will require modifications to work:
30+
/// - It may require correct/in-range values for request initialization.
31+
/// - It may require specifying regional endpoints when creating the service client as shown in
32+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
33+
/// </remarks>
34+
public async Task CreateDatasetAsync()
35+
{
36+
// Create client
37+
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
38+
// Initialize request argument(s)
39+
string parent = "projects/[PROJECT]/locations/[LOCATION]";
40+
Dataset dataset = new Dataset();
41+
// Make the request
42+
Operation<Dataset, CreateDatasetOperationMetadata> response = await datasetServiceClient.CreateDatasetAsync(parent, dataset);
43+
44+
// Poll until the returned long-running operation is complete
45+
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
46+
// Retrieve the operation result
47+
Dataset result = completedResponse.Result;
48+
49+
// Or get the name of the operation
50+
string operationName = response.Name;
51+
// This name can be stored, then the long-running operation retrieved later by name
52+
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceCreateDatasetAsync(operationName);
53+
// Check if the retrieved long-running operation has completed
54+
if (retrievedResponse.IsCompleted)
55+
{
56+
// If it has completed, then access the result
57+
Dataset retrievedResult = retrievedResponse.Result;
58+
}
59+
}
60+
}
61+
// [END aiplatform_v1beta1_generated_DatasetService_CreateDataset_async_flattened]
62+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START aiplatform_v1beta1_generated_DatasetService_CreateDataset_async]
20+
using Google.Api.Gax.ResourceNames;
21+
using Google.Cloud.AIPlatform.V1Beta1;
22+
using Google.LongRunning;
23+
using System.Threading.Tasks;
24+
25+
public sealed partial class GeneratedDatasetServiceClientSnippets
26+
{
27+
/// <summary>Snippet for CreateDatasetAsync</summary>
28+
/// <remarks>
29+
/// This snippet has been automatically generated and should be regarded as a code template only.
30+
/// It will require modifications to work:
31+
/// - It may require correct/in-range values for request initialization.
32+
/// - It may require specifying regional endpoints when creating the service client as shown in
33+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
34+
/// </remarks>
35+
public async Task CreateDatasetRequestObjectAsync()
36+
{
37+
// Create client
38+
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
39+
// Initialize request argument(s)
40+
CreateDatasetRequest request = new CreateDatasetRequest
41+
{
42+
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
43+
Dataset = new Dataset(),
44+
};
45+
// Make the request
46+
Operation<Dataset, CreateDatasetOperationMetadata> response = await datasetServiceClient.CreateDatasetAsync(request);
47+
48+
// Poll until the returned long-running operation is complete
49+
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
50+
// Retrieve the operation result
51+
Dataset result = completedResponse.Result;
52+
53+
// Or get the name of the operation
54+
string operationName = response.Name;
55+
// This name can be stored, then the long-running operation retrieved later by name
56+
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceCreateDatasetAsync(operationName);
57+
// Check if the retrieved long-running operation has completed
58+
if (retrievedResponse.IsCompleted)
59+
{
60+
// If it has completed, then access the result
61+
Dataset retrievedResult = retrievedResponse.Result;
62+
}
63+
}
64+
}
65+
// [END aiplatform_v1beta1_generated_DatasetService_CreateDataset_async]
66+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START aiplatform_v1beta1_generated_DatasetService_CreateDataset_sync]
20+
using Google.Api.Gax.ResourceNames;
21+
using Google.Cloud.AIPlatform.V1Beta1;
22+
using Google.LongRunning;
23+
24+
public sealed partial class GeneratedDatasetServiceClientSnippets
25+
{
26+
/// <summary>Snippet for CreateDataset</summary>
27+
/// <remarks>
28+
/// This snippet has been automatically generated and should be regarded as a code template only.
29+
/// It will require modifications to work:
30+
/// - It may require correct/in-range values for request initialization.
31+
/// - It may require specifying regional endpoints when creating the service client as shown in
32+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
33+
/// </remarks>
34+
public void CreateDatasetRequestObject()
35+
{
36+
// Create client
37+
DatasetServiceClient datasetServiceClient = DatasetServiceClient.Create();
38+
// Initialize request argument(s)
39+
CreateDatasetRequest request = new CreateDatasetRequest
40+
{
41+
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
42+
Dataset = new Dataset(),
43+
};
44+
// Make the request
45+
Operation<Dataset, CreateDatasetOperationMetadata> response = datasetServiceClient.CreateDataset(request);
46+
47+
// Poll until the returned long-running operation is complete
48+
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = response.PollUntilCompleted();
49+
// Retrieve the operation result
50+
Dataset result = completedResponse.Result;
51+
52+
// Or get the name of the operation
53+
string operationName = response.Name;
54+
// This name can be stored, then the long-running operation retrieved later by name
55+
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = datasetServiceClient.PollOnceCreateDataset(operationName);
56+
// Check if the retrieved long-running operation has completed
57+
if (retrievedResponse.IsCompleted)
58+
{
59+
// If it has completed, then access the result
60+
Dataset retrievedResult = retrievedResponse.Result;
61+
}
62+
}
63+
}
64+
// [END aiplatform_v1beta1_generated_DatasetService_CreateDataset_sync]
65+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START aiplatform_v1beta1_generated_DatasetService_CreateDataset_async_flattened_resourceNames]
20+
using Google.Api.Gax.ResourceNames;
21+
using Google.Cloud.AIPlatform.V1Beta1;
22+
using Google.LongRunning;
23+
using System.Threading.Tasks;
24+
25+
public sealed partial class GeneratedDatasetServiceClientSnippets
26+
{
27+
/// <summary>Snippet for CreateDatasetAsync</summary>
28+
/// <remarks>
29+
/// This snippet has been automatically generated and should be regarded as a code template only.
30+
/// It will require modifications to work:
31+
/// - It may require correct/in-range values for request initialization.
32+
/// - It may require specifying regional endpoints when creating the service client as shown in
33+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
34+
/// </remarks>
35+
public async Task CreateDatasetResourceNamesAsync()
36+
{
37+
// Create client
38+
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
39+
// Initialize request argument(s)
40+
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
41+
Dataset dataset = new Dataset();
42+
// Make the request
43+
Operation<Dataset, CreateDatasetOperationMetadata> response = await datasetServiceClient.CreateDatasetAsync(parent, dataset);
44+
45+
// Poll until the returned long-running operation is complete
46+
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
47+
// Retrieve the operation result
48+
Dataset result = completedResponse.Result;
49+
50+
// Or get the name of the operation
51+
string operationName = response.Name;
52+
// This name can be stored, then the long-running operation retrieved later by name
53+
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceCreateDatasetAsync(operationName);
54+
// Check if the retrieved long-running operation has completed
55+
if (retrievedResponse.IsCompleted)
56+
{
57+
// If it has completed, then access the result
58+
Dataset retrievedResult = retrievedResponse.Result;
59+
}
60+
}
61+
}
62+
// [END aiplatform_v1beta1_generated_DatasetService_CreateDataset_async_flattened_resourceNames]
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START aiplatform_v1beta1_generated_DatasetService_CreateDataset_sync_flattened_resourceNames]
20+
using Google.Api.Gax.ResourceNames;
21+
using Google.Cloud.AIPlatform.V1Beta1;
22+
using Google.LongRunning;
23+
24+
public sealed partial class GeneratedDatasetServiceClientSnippets
25+
{
26+
/// <summary>Snippet for CreateDataset</summary>
27+
/// <remarks>
28+
/// This snippet has been automatically generated and should be regarded as a code template only.
29+
/// It will require modifications to work:
30+
/// - It may require correct/in-range values for request initialization.
31+
/// - It may require specifying regional endpoints when creating the service client as shown in
32+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
33+
/// </remarks>
34+
public void CreateDatasetResourceNames()
35+
{
36+
// Create client
37+
DatasetServiceClient datasetServiceClient = DatasetServiceClient.Create();
38+
// Initialize request argument(s)
39+
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
40+
Dataset dataset = new Dataset();
41+
// Make the request
42+
Operation<Dataset, CreateDatasetOperationMetadata> response = datasetServiceClient.CreateDataset(parent, dataset);
43+
44+
// Poll until the returned long-running operation is complete
45+
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = response.PollUntilCompleted();
46+
// Retrieve the operation result
47+
Dataset result = completedResponse.Result;
48+
49+
// Or get the name of the operation
50+
string operationName = response.Name;
51+
// This name can be stored, then the long-running operation retrieved later by name
52+
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = datasetServiceClient.PollOnceCreateDataset(operationName);
53+
// Check if the retrieved long-running operation has completed
54+
if (retrievedResponse.IsCompleted)
55+
{
56+
// If it has completed, then access the result
57+
Dataset retrievedResult = retrievedResponse.Result;
58+
}
59+
}
60+
}
61+
// [END aiplatform_v1beta1_generated_DatasetService_CreateDataset_sync_flattened_resourceNames]
62+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START aiplatform_v1beta1_generated_DatasetService_CreateDataset_sync_flattened]
20+
using Google.Cloud.AIPlatform.V1Beta1;
21+
using Google.LongRunning;
22+
23+
public sealed partial class GeneratedDatasetServiceClientSnippets
24+
{
25+
/// <summary>Snippet for CreateDataset</summary>
26+
/// <remarks>
27+
/// This snippet has been automatically generated and should be regarded as a code template only.
28+
/// It will require modifications to work:
29+
/// - It may require correct/in-range values for request initialization.
30+
/// - It may require specifying regional endpoints when creating the service client as shown in
31+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
/// </remarks>
33+
public void CreateDataset()
34+
{
35+
// Create client
36+
DatasetServiceClient datasetServiceClient = DatasetServiceClient.Create();
37+
// Initialize request argument(s)
38+
string parent = "projects/[PROJECT]/locations/[LOCATION]";
39+
Dataset dataset = new Dataset();
40+
// Make the request
41+
Operation<Dataset, CreateDatasetOperationMetadata> response = datasetServiceClient.CreateDataset(parent, dataset);
42+
43+
// Poll until the returned long-running operation is complete
44+
Operation<Dataset, CreateDatasetOperationMetadata> completedResponse = response.PollUntilCompleted();
45+
// Retrieve the operation result
46+
Dataset result = completedResponse.Result;
47+
48+
// Or get the name of the operation
49+
string operationName = response.Name;
50+
// This name can be stored, then the long-running operation retrieved later by name
51+
Operation<Dataset, CreateDatasetOperationMetadata> retrievedResponse = datasetServiceClient.PollOnceCreateDataset(operationName);
52+
// Check if the retrieved long-running operation has completed
53+
if (retrievedResponse.IsCompleted)
54+
{
55+
// If it has completed, then access the result
56+
Dataset retrievedResult = retrievedResponse.Result;
57+
}
58+
}
59+
}
60+
// [END aiplatform_v1beta1_generated_DatasetService_CreateDataset_sync_flattened]
61+
}

0 commit comments

Comments
 (0)