-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add BatchImportModelEvaluationSlices API in aiplatform v1 model…
…_service.proto PiperOrigin-RevId: 456604066 Source-Link: googleapis/googleapis@d57f437 Source-Link: googleapis/googleapis-gen@d9f3b86 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQUlQbGF0Zm9ybS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiZDlmM2I4NjdjNjA2ODhlZTJlZDVkYmY1NzJhZDg4OTEzZDFmY2U0NSJ9
- Loading branch information
1 parent
2b4568a
commit f742d07
Showing
14 changed files
with
1,536 additions
and
98 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
...V1.GeneratedSnippets/ModelServiceClient.BatchImportModelEvaluationSlicesAsyncSnippet.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 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.AIPlatform.V1.Snippets | ||
{ | ||
// [START aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_async_flattened] | ||
using Google.Cloud.AIPlatform.V1; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedModelServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for BatchImportModelEvaluationSlicesAsync</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 BatchImportModelEvaluationSlicesAsync() | ||
{ | ||
// Create client | ||
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]"; | ||
IEnumerable<ModelEvaluationSlice> modelEvaluationSlices = new ModelEvaluationSlice[] | ||
{ | ||
new ModelEvaluationSlice(), | ||
}; | ||
// Make the request | ||
BatchImportModelEvaluationSlicesResponse response = await modelServiceClient.BatchImportModelEvaluationSlicesAsync(parent, modelEvaluationSlices); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_async_flattened] | ||
} |
48 changes: 48 additions & 0 deletions
48
...nippets/ModelServiceClient.BatchImportModelEvaluationSlicesRequestObjectAsyncSnippet.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 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.AIPlatform.V1.Snippets | ||
{ | ||
// [START aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_async] | ||
using Google.Cloud.AIPlatform.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedModelServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for BatchImportModelEvaluationSlicesAsync</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 BatchImportModelEvaluationSlicesRequestObjectAsync() | ||
{ | ||
// Create client | ||
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
BatchImportModelEvaluationSlicesRequest request = new BatchImportModelEvaluationSlicesRequest | ||
{ | ||
ParentAsModelEvaluationName = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"), | ||
ModelEvaluationSlices = | ||
{ | ||
new ModelEvaluationSlice(), | ||
}, | ||
}; | ||
// Make the request | ||
BatchImportModelEvaluationSlicesResponse response = await modelServiceClient.BatchImportModelEvaluationSlicesAsync(request); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_async] | ||
} |
47 changes: 47 additions & 0 deletions
47
...atedSnippets/ModelServiceClient.BatchImportModelEvaluationSlicesRequestObjectSnippet.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 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.AIPlatform.V1.Snippets | ||
{ | ||
// [START aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_sync] | ||
using Google.Cloud.AIPlatform.V1; | ||
|
||
public sealed partial class GeneratedModelServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for BatchImportModelEvaluationSlices</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void BatchImportModelEvaluationSlicesRequestObject() | ||
{ | ||
// Create client | ||
ModelServiceClient modelServiceClient = ModelServiceClient.Create(); | ||
// Initialize request argument(s) | ||
BatchImportModelEvaluationSlicesRequest request = new BatchImportModelEvaluationSlicesRequest | ||
{ | ||
ParentAsModelEvaluationName = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"), | ||
ModelEvaluationSlices = | ||
{ | ||
new ModelEvaluationSlice(), | ||
}, | ||
}; | ||
// Make the request | ||
BatchImportModelEvaluationSlicesResponse response = modelServiceClient.BatchImportModelEvaluationSlices(request); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_sync] | ||
} |
46 changes: 46 additions & 0 deletions
46
...nippets/ModelServiceClient.BatchImportModelEvaluationSlicesResourceNamesAsyncSnippet.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 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.AIPlatform.V1.Snippets | ||
{ | ||
// [START aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_async_flattened_resourceNames] | ||
using Google.Cloud.AIPlatform.V1; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedModelServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for BatchImportModelEvaluationSlicesAsync</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 BatchImportModelEvaluationSlicesResourceNamesAsync() | ||
{ | ||
// Create client | ||
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
ModelEvaluationName parent = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); | ||
IEnumerable<ModelEvaluationSlice> modelEvaluationSlices = new ModelEvaluationSlice[] | ||
{ | ||
new ModelEvaluationSlice(), | ||
}; | ||
// Make the request | ||
BatchImportModelEvaluationSlicesResponse response = await modelServiceClient.BatchImportModelEvaluationSlicesAsync(parent, modelEvaluationSlices); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_async_flattened_resourceNames] | ||
} |
45 changes: 45 additions & 0 deletions
45
...atedSnippets/ModelServiceClient.BatchImportModelEvaluationSlicesResourceNamesSnippet.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 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.AIPlatform.V1.Snippets | ||
{ | ||
// [START aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_sync_flattened_resourceNames] | ||
using Google.Cloud.AIPlatform.V1; | ||
using System.Collections.Generic; | ||
|
||
public sealed partial class GeneratedModelServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for BatchImportModelEvaluationSlices</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void BatchImportModelEvaluationSlicesResourceNames() | ||
{ | ||
// Create client | ||
ModelServiceClient modelServiceClient = ModelServiceClient.Create(); | ||
// Initialize request argument(s) | ||
ModelEvaluationName parent = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); | ||
IEnumerable<ModelEvaluationSlice> modelEvaluationSlices = new ModelEvaluationSlice[] | ||
{ | ||
new ModelEvaluationSlice(), | ||
}; | ||
// Make the request | ||
BatchImportModelEvaluationSlicesResponse response = modelServiceClient.BatchImportModelEvaluationSlices(parent, modelEvaluationSlices); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_sync_flattened_resourceNames] | ||
} |
45 changes: 45 additions & 0 deletions
45
...form.V1.GeneratedSnippets/ModelServiceClient.BatchImportModelEvaluationSlicesSnippet.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 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.AIPlatform.V1.Snippets | ||
{ | ||
// [START aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_sync_flattened] | ||
using Google.Cloud.AIPlatform.V1; | ||
using System.Collections.Generic; | ||
|
||
public sealed partial class GeneratedModelServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for BatchImportModelEvaluationSlices</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void BatchImportModelEvaluationSlices() | ||
{ | ||
// Create client | ||
ModelServiceClient modelServiceClient = ModelServiceClient.Create(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]"; | ||
IEnumerable<ModelEvaluationSlice> modelEvaluationSlices = new ModelEvaluationSlice[] | ||
{ | ||
new ModelEvaluationSlice(), | ||
}; | ||
// Make the request | ||
BatchImportModelEvaluationSlicesResponse response = modelServiceClient.BatchImportModelEvaluationSlices(parent, modelEvaluationSlices); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_ModelService_BatchImportModelEvaluationSlices_sync_flattened] | ||
} |
Oops, something went wrong.