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: eyJwIjoiYXBpcy9Hb29nbGUuTWFwcy5GbGVldEVuZ2luZS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiNzc2NzIxYTBhN2FiMmNhOGYwNmEyZTgwZTRmMTQ2ZTgzNWViYmU0YyJ9
  • Loading branch information
gcf-owl-bot[bot] authored and amanda-tarafa committed Feb 27, 2025
1 parent 9e1f4fc commit 1c59977
Show file tree
Hide file tree
Showing 24 changed files with 2,610 additions and 189 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// 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_TripService_DeleteTrip_async_flattened]
using Google.Maps.FleetEngine.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedTripServiceClientSnippets
{
/// <summary>Snippet for DeleteTripAsync</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 DeleteTripAsync()
{
// Create client
TripServiceClient tripServiceClient = await TripServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/trips/[TRIP]";
// Make the request
await tripServiceClient.DeleteTripAsync(name);
}
}
// [END fleetengine_v1_generated_TripService_DeleteTrip_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// 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_TripService_DeleteTrip_async]
using Google.Maps.FleetEngine.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedTripServiceClientSnippets
{
/// <summary>Snippet for DeleteTripAsync</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 DeleteTripRequestObjectAsync()
{
// Create client
TripServiceClient tripServiceClient = await TripServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteTripRequest request = new DeleteTripRequest
{
Header = new RequestHeader(),
TripName = TripName.FromProviderTrip("[PROVIDER]", "[TRIP]"),
};
// Make the request
await tripServiceClient.DeleteTripAsync(request);
}
}
// [END fleetengine_v1_generated_TripService_DeleteTrip_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_TripService_DeleteTrip_sync]
using Google.Maps.FleetEngine.V1;

public sealed partial class GeneratedTripServiceClientSnippets
{
/// <summary>Snippet for DeleteTrip</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 DeleteTripRequestObject()
{
// Create client
TripServiceClient tripServiceClient = TripServiceClient.Create();
// Initialize request argument(s)
DeleteTripRequest request = new DeleteTripRequest
{
Header = new RequestHeader(),
TripName = TripName.FromProviderTrip("[PROVIDER]", "[TRIP]"),
};
// Make the request
tripServiceClient.DeleteTrip(request);
}
}
// [END fleetengine_v1_generated_TripService_DeleteTrip_sync]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// 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_TripService_DeleteTrip_async_flattened_resourceNames]
using Google.Maps.FleetEngine.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedTripServiceClientSnippets
{
/// <summary>Snippet for DeleteTripAsync</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 DeleteTripResourceNamesAsync()
{
// Create client
TripServiceClient tripServiceClient = await TripServiceClient.CreateAsync();
// Initialize request argument(s)
TripName name = TripName.FromProviderTrip("[PROVIDER]", "[TRIP]");
// Make the request
await tripServiceClient.DeleteTripAsync(name);
}
}
// [END fleetengine_v1_generated_TripService_DeleteTrip_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_TripService_DeleteTrip_sync_flattened_resourceNames]
using Google.Maps.FleetEngine.V1;

public sealed partial class GeneratedTripServiceClientSnippets
{
/// <summary>Snippet for DeleteTrip</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 DeleteTripResourceNames()
{
// Create client
TripServiceClient tripServiceClient = TripServiceClient.Create();
// Initialize request argument(s)
TripName name = TripName.FromProviderTrip("[PROVIDER]", "[TRIP]");
// Make the request
tripServiceClient.DeleteTrip(name);
}
}
// [END fleetengine_v1_generated_TripService_DeleteTrip_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_TripService_DeleteTrip_sync_flattened]
using Google.Maps.FleetEngine.V1;

public sealed partial class GeneratedTripServiceClientSnippets
{
/// <summary>Snippet for DeleteTrip</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 DeleteTrip()
{
// Create client
TripServiceClient tripServiceClient = TripServiceClient.Create();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/trips/[TRIP]";
// Make the request
tripServiceClient.DeleteTrip(name);
}
}
// [END fleetengine_v1_generated_TripService_DeleteTrip_sync_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// 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_VehicleService_DeleteVehicle_async_flattened]
using Google.Maps.FleetEngine.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedVehicleServiceClientSnippets
{
/// <summary>Snippet for DeleteVehicleAsync</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 DeleteVehicleAsync()
{
// Create client
VehicleServiceClient vehicleServiceClient = await VehicleServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "providers/[PROVIDER]/vehicles/[VEHICLE]";
// Make the request
await vehicleServiceClient.DeleteVehicleAsync(name);
}
}
// [END fleetengine_v1_generated_VehicleService_DeleteVehicle_async_flattened]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// 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_VehicleService_DeleteVehicle_async]
using Google.Maps.FleetEngine.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedVehicleServiceClientSnippets
{
/// <summary>Snippet for DeleteVehicleAsync</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 DeleteVehicleRequestObjectAsync()
{
// Create client
VehicleServiceClient vehicleServiceClient = await VehicleServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteVehicleRequest request = new DeleteVehicleRequest
{
Header = new RequestHeader(),
VehicleName = VehicleName.FromProviderVehicle("[PROVIDER]", "[VEHICLE]"),
};
// Make the request
await vehicleServiceClient.DeleteVehicleAsync(request);
}
}
// [END fleetengine_v1_generated_VehicleService_DeleteVehicle_async]
}
Loading

0 comments on commit 1c59977

Please sign in to comment.