Skip to content

Commit

Permalink
feat: Added Fleet Engine Delete APIs
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 731779200

Source-Link: googleapis/googleapis@fc5c0bd

Source-Link: googleapis/googleapis-gen@776721a
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuTWFwcy5GbGVldEVuZ2luZS5EZWxpdmVyeS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiNzc2NzIxYTBhN2FiMmNhOGYwNmEyZTgwZTRmMTQ2ZTgzNWViYmU0YyJ9
  • Loading branch information
gcf-owl-bot[bot] authored and amanda-tarafa committed Feb 27, 2025
1 parent 1c59977 commit cac2084
Show file tree
Hide file tree
Showing 19 changed files with 2,549 additions and 128 deletions.
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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_async_flattened]
using System.Threading.Tasks;
using gmfdv = Google.Maps.FleetEngine.Delivery.V1;

public sealed partial class GeneratedDeliveryServiceClientSnippets
{
/// <summary>Snippet for DeleteDeliveryVehicleAsync</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 DeleteDeliveryVehicleAsync()
{
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/deliveryVehicles/[VEHICLE]";
// Make the request
await deliveryServiceClient.DeleteDeliveryVehicleAsync(name);
}
}
// [END fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// 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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_async]
using System.Threading.Tasks;
using gmfdv = Google.Maps.FleetEngine.Delivery.V1;

public sealed partial class GeneratedDeliveryServiceClientSnippets
{
/// <summary>Snippet for DeleteDeliveryVehicleAsync</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 DeleteDeliveryVehicleRequestObjectAsync()
{
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::DeleteDeliveryVehicleRequest request = new gmfdv::DeleteDeliveryVehicleRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
DeliveryVehicleName = gmfdv::DeliveryVehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]"),
};
// Make the request
await deliveryServiceClient.DeleteDeliveryVehicleAsync(request);
}
}
// [END fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_async]
}
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 fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync]
using Google.Maps.FleetEngine.Delivery.V1;

public sealed partial class GeneratedDeliveryServiceClientSnippets
{
/// <summary>Snippet for DeleteDeliveryVehicle</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 DeleteDeliveryVehicleRequestObject()
{
// Create client
DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.Create();
// Initialize request argument(s)
DeleteDeliveryVehicleRequest request = new DeleteDeliveryVehicleRequest
{
Header = new DeliveryRequestHeader(),
DeliveryVehicleName = DeliveryVehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]"),
};
// Make the request
deliveryServiceClient.DeleteDeliveryVehicle(request);
}
}
// [END fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync]
}
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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_async_flattened_resourceNames]
using System.Threading.Tasks;
using gmfdv = Google.Maps.FleetEngine.Delivery.V1;

public sealed partial class GeneratedDeliveryServiceClientSnippets
{
/// <summary>Snippet for DeleteDeliveryVehicleAsync</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 DeleteDeliveryVehicleResourceNamesAsync()
{
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::DeliveryVehicleName name = gmfdv::DeliveryVehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]");
// Make the request
await deliveryServiceClient.DeleteDeliveryVehicleAsync(name);
}
}
// [END fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_async_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// 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 fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync_flattened_resourceNames]
using Google.Maps.FleetEngine.Delivery.V1;

public sealed partial class GeneratedDeliveryServiceClientSnippets
{
/// <summary>Snippet for DeleteDeliveryVehicle</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 DeleteDeliveryVehicleResourceNames()
{
// Create client
DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.Create();
// Initialize request argument(s)
DeliveryVehicleName name = DeliveryVehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]");
// Make the request
deliveryServiceClient.DeleteDeliveryVehicle(name);
}
}
// [END fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync_flattened_resourceNames]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// 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 fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync_flattened]
using Google.Maps.FleetEngine.Delivery.V1;

public sealed partial class GeneratedDeliveryServiceClientSnippets
{
/// <summary>Snippet for DeleteDeliveryVehicle</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 DeleteDeliveryVehicle()
{
// Create client
DeliveryServiceClient deliveryServiceClient = DeliveryServiceClient.Create();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/deliveryVehicles/[VEHICLE]";
// Make the request
deliveryServiceClient.DeleteDeliveryVehicle(name);
}
}
// [END fleetengine_v1_generated_DeliveryService_DeleteDeliveryVehicle_sync_flattened]
}
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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START fleetengine_v1_generated_DeliveryService_DeleteTask_async_flattened]
using System.Threading.Tasks;
using gmfdv = Google.Maps.FleetEngine.Delivery.V1;

public sealed partial class GeneratedDeliveryServiceClientSnippets
{
/// <summary>Snippet for DeleteTaskAsync</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 DeleteTaskAsync()
{
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/tasks/[TASK]";
// Make the request
await deliveryServiceClient.DeleteTaskAsync(name);
}
}
// [END fleetengine_v1_generated_DeliveryService_DeleteTask_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// 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!

#pragma warning disable CS8981

namespace GoogleCSharpSnippets
{
// [START fleetengine_v1_generated_DeliveryService_DeleteTask_async]
using System.Threading.Tasks;
using gmfdv = Google.Maps.FleetEngine.Delivery.V1;

public sealed partial class GeneratedDeliveryServiceClientSnippets
{
/// <summary>Snippet for DeleteTaskAsync</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 DeleteTaskRequestObjectAsync()
{
// Create client
gmfdv::DeliveryServiceClient deliveryServiceClient = await gmfdv::DeliveryServiceClient.CreateAsync();
// Initialize request argument(s)
gmfdv::DeleteTaskRequest request = new gmfdv::DeleteTaskRequest
{
Header = new gmfdv::DeliveryRequestHeader(),
TaskName = gmfdv::TaskName.FromProviderTask("[PROVIDER]", "[TASK]"),
};
// Make the request
await deliveryServiceClient.DeleteTaskAsync(request);
}
}
// [END fleetengine_v1_generated_DeliveryService_DeleteTask_async]
}
Loading

0 comments on commit cac2084

Please sign in to comment.