Skip to content

Commit

Permalink
feat: add data_item_count to Dataset
Browse files Browse the repository at this point in the history
feat: add DeleteSavedQuery to DatasetService
feat: add JOB_STATE_PARTIALLY_SUCCEEDED to JobState
feat: add pipeline_job to Model
feat: add reserved_ip_ranges to PipelineJob

PiperOrigin-RevId: 547343567

Source-Link: googleapis/googleapis@72b20cc

Source-Link: googleapis/googleapis-gen@4d84e76
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQUlQbGF0Zm9ybS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiNGQ4NGU3NmRmNmY1YTM2MWVjYTM1NzNhMGY2OTIyMWI0MjFlNzM1OSJ9
  • Loading branch information
gcf-owl-bot[bot] authored and amanda-tarafa committed Jul 13, 2023
1 parent a1de856 commit 445fa0e
Show file tree
Hide file tree
Showing 28 changed files with 3,886 additions and 2,438 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright 2023 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_DatasetService_DeleteSavedQuery_async_flattened]
using Google.Cloud.AIPlatform.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedDatasetServiceClientSnippets
{
/// <summary>Snippet for DeleteSavedQueryAsync</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 DeleteSavedQueryAsync()
{
// Create client
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]/savedQueries/[SAVED_QUERY]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await datasetServiceClient.DeleteSavedQueryAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceDeleteSavedQueryAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END aiplatform_v1_generated_DatasetService_DeleteSavedQuery_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright 2023 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_DatasetService_DeleteSavedQuery_async]
using Google.Cloud.AIPlatform.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedDatasetServiceClientSnippets
{
/// <summary>Snippet for DeleteSavedQueryAsync</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 DeleteSavedQueryRequestObjectAsync()
{
// Create client
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSavedQueryRequest request = new DeleteSavedQueryRequest
{
SavedQueryName = SavedQueryName.FromProjectLocationDatasetSavedQuery("[PROJECT]", "[LOCATION]", "[DATASET]", "[SAVED_QUERY]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await datasetServiceClient.DeleteSavedQueryAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceDeleteSavedQueryAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END aiplatform_v1_generated_DatasetService_DeleteSavedQuery_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Copyright 2023 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_DatasetService_DeleteSavedQuery_sync]
using Google.Cloud.AIPlatform.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedDatasetServiceClientSnippets
{
/// <summary>Snippet for DeleteSavedQuery</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 DeleteSavedQueryRequestObject()
{
// Create client
DatasetServiceClient datasetServiceClient = DatasetServiceClient.Create();
// Initialize request argument(s)
DeleteSavedQueryRequest request = new DeleteSavedQueryRequest
{
SavedQueryName = SavedQueryName.FromProjectLocationDatasetSavedQuery("[PROJECT]", "[LOCATION]", "[DATASET]", "[SAVED_QUERY]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = datasetServiceClient.DeleteSavedQuery(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, DeleteOperationMetadata> retrievedResponse = datasetServiceClient.PollOnceDeleteSavedQuery(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END aiplatform_v1_generated_DatasetService_DeleteSavedQuery_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright 2023 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_DatasetService_DeleteSavedQuery_async_flattened_resourceNames]
using Google.Cloud.AIPlatform.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedDatasetServiceClientSnippets
{
/// <summary>Snippet for DeleteSavedQueryAsync</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 DeleteSavedQueryResourceNamesAsync()
{
// Create client
DatasetServiceClient datasetServiceClient = await DatasetServiceClient.CreateAsync();
// Initialize request argument(s)
SavedQueryName name = SavedQueryName.FromProjectLocationDatasetSavedQuery("[PROJECT]", "[LOCATION]", "[DATASET]", "[SAVED_QUERY]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await datasetServiceClient.DeleteSavedQueryAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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<Empty, DeleteOperationMetadata> retrievedResponse = await datasetServiceClient.PollOnceDeleteSavedQueryAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END aiplatform_v1_generated_DatasetService_DeleteSavedQuery_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright 2023 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_DatasetService_DeleteSavedQuery_sync_flattened_resourceNames]
using Google.Cloud.AIPlatform.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedDatasetServiceClientSnippets
{
/// <summary>Snippet for DeleteSavedQuery</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 DeleteSavedQueryResourceNames()
{
// Create client
DatasetServiceClient datasetServiceClient = DatasetServiceClient.Create();
// Initialize request argument(s)
SavedQueryName name = SavedQueryName.FromProjectLocationDatasetSavedQuery("[PROJECT]", "[LOCATION]", "[DATASET]", "[SAVED_QUERY]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = datasetServiceClient.DeleteSavedQuery(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, DeleteOperationMetadata> retrievedResponse = datasetServiceClient.PollOnceDeleteSavedQuery(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END aiplatform_v1_generated_DatasetService_DeleteSavedQuery_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright 2023 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_DatasetService_DeleteSavedQuery_sync_flattened]
using Google.Cloud.AIPlatform.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedDatasetServiceClientSnippets
{
/// <summary>Snippet for DeleteSavedQuery</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 DeleteSavedQuery()
{
// Create client
DatasetServiceClient datasetServiceClient = DatasetServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]/savedQueries/[SAVED_QUERY]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = datasetServiceClient.DeleteSavedQuery(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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<Empty, DeleteOperationMetadata> retrievedResponse = datasetServiceClient.PollOnceDeleteSavedQuery(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
}
}
// [END aiplatform_v1_generated_DatasetService_DeleteSavedQuery_sync_flattened]
}
Loading

0 comments on commit 445fa0e

Please sign in to comment.