Skip to content

Commit

Permalink
feat: add BatchImportModelEvaluationSlices API in aiplatform v1 model…
Browse files Browse the repository at this point in the history
…_service.proto

PiperOrigin-RevId: 456604066

Source-Link: googleapis/googleapis@d57f437

Source-Link: googleapis/googleapis-gen@d9f3b86
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQUlQbGF0Zm9ybS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiZDlmM2I4NjdjNjA2ODhlZTJlZDVkYmY1NzJhZDg4OTEzZDFmY2U0NSJ9
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Jun 23, 2022
1 parent 2b4568a commit f742d07
Show file tree
Hide file tree
Showing 14 changed files with 1,536 additions and 98 deletions.
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]
}
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]
}
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]
}
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]
}
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]
}
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]
}
Loading

0 comments on commit f742d07

Please sign in to comment.