Skip to content

Commit

Permalink
fix!: [google-maps-fleetengine] An existing method `UpdateVehicleLoca…
Browse files Browse the repository at this point in the history
…tion` is removed from service `VehicleService` (#12666)

BEGIN_COMMIT_OVERRIDE
fix!: An existing method `UpdateVehicleLocation` is removed from service
`VehicleService`
fix!: An existing method `SearchFuzzedVehicles` is removed from service
`VehicleService`
fix!: An existing message `UpdateVehicleLocationRequest` is removed
END_COMMIT_OVERRIDE

- [ ] Regenerate this pull request now.

fix!: An existing method `SearchFuzzedVehicles` is removed from service
`VehicleService`
fix!: An existing message `UpdateVehicleLocationRequest` is removed

PiperOrigin-RevId: 631557549

Source-Link:
googleapis/googleapis@3d50414

Source-Link:
googleapis/googleapis-gen@5ce63d4
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtZmxlZXRlbmdpbmUvLk93bEJvdC55YW1sIiwiaCI6IjVjZTYzZDRlNjM2YTk3NTE3NWJkZTJkMTZjMTVlNzBkZDVhODFmZjQifQ==

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: ohmayr <omairnaveed@ymail.com>
  • Loading branch information
3 people authored May 8, 2024
1 parent 6c696a2 commit e6969d5
Show file tree
Hide file tree
Showing 22 changed files with 1,319 additions and 1,726 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
SearchVehiclesResponse,
UpdateVehicleAttributesRequest,
UpdateVehicleAttributesResponse,
UpdateVehicleLocationRequest,
UpdateVehicleRequest,
VehicleAttributeList,
VehicleMatch,
Expand Down Expand Up @@ -125,7 +124,6 @@
"SearchVehiclesResponse",
"UpdateVehicleAttributesRequest",
"UpdateVehicleAttributesResponse",
"UpdateVehicleLocationRequest",
"UpdateVehicleRequest",
"VehicleAttributeList",
"VehicleMatch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
SearchVehiclesResponse,
UpdateVehicleAttributesRequest,
UpdateVehicleAttributesResponse,
UpdateVehicleLocationRequest,
UpdateVehicleRequest,
VehicleAttributeList,
VehicleMatch,
Expand Down Expand Up @@ -117,7 +116,6 @@
"UpdateTripRequest",
"UpdateVehicleAttributesRequest",
"UpdateVehicleAttributesResponse",
"UpdateVehicleLocationRequest",
"UpdateVehicleRequest",
"Vehicle",
"VehicleAttribute",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@
"list_vehicles"
]
},
"SearchFuzzedVehicles": {
"methods": [
"search_fuzzed_vehicles"
]
},
"SearchVehicles": {
"methods": [
"search_vehicles"
Expand All @@ -108,11 +103,6 @@
"methods": [
"update_vehicle_attributes"
]
},
"UpdateVehicleLocation": {
"methods": [
"update_vehicle_location"
]
}
}
},
Expand All @@ -134,11 +124,6 @@
"list_vehicles"
]
},
"SearchFuzzedVehicles": {
"methods": [
"search_fuzzed_vehicles"
]
},
"SearchVehicles": {
"methods": [
"search_vehicles"
Expand All @@ -153,11 +138,6 @@
"methods": [
"update_vehicle_attributes"
]
},
"UpdateVehicleLocation": {
"methods": [
"update_vehicle_location"
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import functools
import re
from typing import (
Callable,
Dict,
Mapping,
MutableMapping,
Expand Down Expand Up @@ -195,7 +196,9 @@ def __init__(
self,
*,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, TripServiceTransport] = "grpc_asyncio",
transport: Optional[
Union[str, TripServiceTransport, Callable[..., TripServiceTransport]]
] = "grpc_asyncio",
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
Expand All @@ -207,9 +210,11 @@ def __init__(
credentials identify the application to the service; if none
are specified, the client will attempt to ascertain the
credentials from the environment.
transport (Union[str, ~.TripServiceTransport]): The
transport to use. If set to None, a transport is chosen
automatically.
transport (Optional[Union[str,TripServiceTransport,Callable[..., TripServiceTransport]]]):
The transport to use, or a Callable that constructs and returns a new transport to use.
If a Callable is given, it will be called with the same set of initialization
arguments as used in the TripServiceTransport constructor.
If set to None, a transport is chosen automatically.
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]):
Custom options for the client.
Expand Down Expand Up @@ -305,24 +310,16 @@ async def sample_create_trip():
Trip metadata.
"""
# Create or coerce a protobuf request object.
request = trip_api.CreateTripRequest(request)
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, trip_api.CreateTripRequest):
request = trip_api.CreateTripRequest(request)

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.create_trip,
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=15.0,
),
default_timeout=15.0,
client_info=DEFAULT_CLIENT_INFO,
)
rpc = self._client._transport._wrapped_methods[
self._client._transport.create_trip
]

# Certain fields should be provided within the metadata header;
# add these here.
Expand Down Expand Up @@ -394,24 +391,14 @@ async def sample_get_trip():
Trip metadata.
"""
# Create or coerce a protobuf request object.
request = trip_api.GetTripRequest(request)
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, trip_api.GetTripRequest):
request = trip_api.GetTripRequest(request)

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.get_trip,
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=15.0,
),
default_timeout=15.0,
client_info=DEFAULT_CLIENT_INFO,
)
rpc = self._client._transport._wrapped_methods[self._client._transport.get_trip]

# Certain fields should be provided within the metadata header;
# add these here.
Expand Down Expand Up @@ -477,15 +464,16 @@ async def sample_report_billable_trip():
sent along with the request as metadata.
"""
# Create or coerce a protobuf request object.
request = trip_api.ReportBillableTripRequest(request)
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, trip_api.ReportBillableTripRequest):
request = trip_api.ReportBillableTripRequest(request)

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.report_billable_trip,
default_timeout=None,
client_info=DEFAULT_CLIENT_INFO,
)
rpc = self._client._transport._wrapped_methods[
self._client._transport.report_billable_trip
]

# Certain fields should be provided within the metadata header;
# add these here.
Expand Down Expand Up @@ -560,24 +548,16 @@ async def sample_search_trips():
"""
# Create or coerce a protobuf request object.
request = trip_api.SearchTripsRequest(request)
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, trip_api.SearchTripsRequest):
request = trip_api.SearchTripsRequest(request)

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.search_trips,
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=15.0,
),
default_timeout=15.0,
client_info=DEFAULT_CLIENT_INFO,
)
rpc = self._client._transport._wrapped_methods[
self._client._transport.search_trips
]

# Certain fields should be provided within the metadata header;
# add these here.
Expand Down Expand Up @@ -658,24 +638,16 @@ async def sample_update_trip():
Trip metadata.
"""
# Create or coerce a protobuf request object.
request = trip_api.UpdateTripRequest(request)
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, trip_api.UpdateTripRequest):
request = trip_api.UpdateTripRequest(request)

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.update_trip,
default_retry=retries.AsyncRetry(
initial=1.0,
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=15.0,
),
default_timeout=15.0,
client_info=DEFAULT_CLIENT_INFO,
)
rpc = self._client._transport._wrapped_methods[
self._client._transport.update_trip
]

# Certain fields should be provided within the metadata header;
# add these here.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os
import re
from typing import (
Callable,
Dict,
Mapping,
MutableMapping,
Expand Down Expand Up @@ -525,7 +526,9 @@ def __init__(
self,
*,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Optional[Union[str, TripServiceTransport]] = None,
transport: Optional[
Union[str, TripServiceTransport, Callable[..., TripServiceTransport]]
] = None,
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
Expand All @@ -537,9 +540,11 @@ def __init__(
credentials identify the application to the service; if none
are specified, the client will attempt to ascertain the
credentials from the environment.
transport (Union[str, TripServiceTransport]): The
transport to use. If set to None, a transport is chosen
automatically.
transport (Optional[Union[str,TripServiceTransport,Callable[..., TripServiceTransport]]]):
The transport to use, or a Callable that constructs and returns a new transport.
If a Callable is given, it will be called with the same set of initialization
arguments as used in the TripServiceTransport constructor.
If set to None, a transport is chosen automatically.
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]):
Custom options for the client.
Expand Down Expand Up @@ -645,8 +650,15 @@ def __init__(
api_key_value
)

Transport = type(self).get_transport_class(cast(str, transport))
self._transport = Transport(
transport_init: Union[
Type[TripServiceTransport], Callable[..., TripServiceTransport]
] = (
type(self).get_transport_class(transport)
if isinstance(transport, str) or transport is None
else cast(Callable[..., TripServiceTransport], transport)
)
# initialize with the provided callable or the passed in class
self._transport = transport_init(
credentials=credentials,
credentials_file=self._client_options.credentials_file,
host=self._api_endpoint,
Expand Down Expand Up @@ -710,10 +722,8 @@ def sample_create_trip():
Trip metadata.
"""
# Create or coerce a protobuf request object.
# Minor optimization to avoid making a copy if the user passes
# in a trip_api.CreateTripRequest.
# There's no risk of modifying the input as we've already verified
# there are no flattened fields.
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, trip_api.CreateTripRequest):
request = trip_api.CreateTripRequest(request)

Expand Down Expand Up @@ -797,10 +807,8 @@ def sample_get_trip():
Trip metadata.
"""
# Create or coerce a protobuf request object.
# Minor optimization to avoid making a copy if the user passes
# in a trip_api.GetTripRequest.
# There's no risk of modifying the input as we've already verified
# there are no flattened fields.
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, trip_api.GetTripRequest):
request = trip_api.GetTripRequest(request)

Expand Down Expand Up @@ -878,10 +886,8 @@ def sample_report_billable_trip():
sent along with the request as metadata.
"""
# Create or coerce a protobuf request object.
# Minor optimization to avoid making a copy if the user passes
# in a trip_api.ReportBillableTripRequest.
# There's no risk of modifying the input as we've already verified
# there are no flattened fields.
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, trip_api.ReportBillableTripRequest):
request = trip_api.ReportBillableTripRequest(request)

Expand Down Expand Up @@ -968,10 +974,8 @@ def sample_search_trips():
"""
# Create or coerce a protobuf request object.
# Minor optimization to avoid making a copy if the user passes
# in a trip_api.SearchTripsRequest.
# There's no risk of modifying the input as we've already verified
# there are no flattened fields.
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, trip_api.SearchTripsRequest):
request = trip_api.SearchTripsRequest(request)

Expand Down Expand Up @@ -1064,10 +1068,8 @@ def sample_update_trip():
Trip metadata.
"""
# Create or coerce a protobuf request object.
# Minor optimization to avoid making a copy if the user passes
# in a trip_api.UpdateTripRequest.
# There's no risk of modifying the input as we've already verified
# there are no flattened fields.
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, trip_api.UpdateTripRequest):
request = trip_api.UpdateTripRequest(request)

Expand Down
Loading

0 comments on commit e6969d5

Please sign in to comment.