# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T02:36:09+00:00
from __future__ import annotations
from enum import Enum
from typing import Dict, List, Optional
from pydantic import BaseModel, Field
class ImpressionType(Enum):
IMPRESSION_TYPE_UNSPECIFIED = 'IMPRESSION_TYPE_UNSPECIFIED'
PRESENTED = 'PRESENTED'
INTERACTED = 'INTERACTED'
class GoogleMapsPlayablelocationsV3Impression(BaseModel):
gameObjectType: Optional[int] = Field(
None,
description='An arbitrary, developer-defined type identifier for each type of game object used in your game. Since players interact with differ types of game objects in different ways, this field allows you to segregate impression data by type for analysis. You should assign a unique `game_object_type` ID to represent a distinct type of game object in your game. For example, 1=monster location, 2=powerup location.',
)
impressionType: Optional[ImpressionType] = Field(
None, description='Required. The type of impression event.'
)
locationName: Optional[str] = Field(
None, description='Required. The name of the playable location.'
)
class GoogleMapsPlayablelocationsV3LogImpressionsResponse(BaseModel):
pass
class GoogleMapsPlayablelocationsV3LogPlayerReportsResponse(BaseModel):
pass
class Reason(Enum):
BAD_LOCATION_REASON_UNSPECIFIED = 'BAD_LOCATION_REASON_UNSPECIFIED'
OTHER = 'OTHER'
NOT_PEDESTRIAN_ACCESSIBLE = 'NOT_PEDESTRIAN_ACCESSIBLE'
NOT_OPEN_TO_PUBLIC = 'NOT_OPEN_TO_PUBLIC'
PERMANENTLY_CLOSED = 'PERMANENTLY_CLOSED'
TEMPORARILY_INACCESSIBLE = 'TEMPORARILY_INACCESSIBLE'
class GoogleMapsPlayablelocationsV3PlayerReport(BaseModel):
languageCode: Optional[str] = Field(
None,
description='Language code (in BCP-47 format) indicating the language of the freeform description provided in `reason_details`. Examples are "en", "en-US" or "ja-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.',
)
locationName: Optional[str] = Field(
None, description='Required. The name of the playable location.'
)
reasonDetails: Optional[str] = Field(
None,
description='Required. A free-form description detailing why the playable location is considered bad.',
)
reasons: Optional[List[Reason]] = Field(
None,
description='Required. One or more reasons why this playable location is considered bad.',
)
class GoogleMapsPlayablelocationsV3SampleAreaFilter(BaseModel):
s2CellId: Optional[str] = Field(
None,
description='Required. The S2 cell ID of the area you want. This must be between cell level 11 and 14 (inclusive). S2 cells are 64-bit integers that identify areas on the Earth. They are hierarchical, and can therefore be used for spatial indexing. The S2 geometry library is available in a number of languages: * [C++](https://github.com/google/s2geometry) * [Java](https://github.com/google/s2-geometry-library-java) * [Go](https://github.com/golang/geo) * [Python](https://github.com/google/s2geometry/tree/master/src/python)',
)
class PointType(Enum):
POINT_TYPE_UNSPECIFIED = 'POINT_TYPE_UNSPECIFIED'
CENTER_POINT = 'CENTER_POINT'
SNAPPED_POINT = 'SNAPPED_POINT'
class GoogleMapsPlayablelocationsV3SampleSpacingOptions(BaseModel):
minSpacingMeters: Optional[float] = Field(
None,
description='Required. The minimum spacing between any two playable locations, measured in meters. The minimum value is 30. The maximum value is 1000. Inputs will be rounded up to the next 10 meter interval. The default value is 200m. Set this field to remove tight clusters of playable locations. Note: The spacing is a greedy algorithm. It optimizes for selecting the highest ranking locations first, not to maximize the number of locations selected. Consider the following scenario: * Rank: A: 2, B: 1, C: 3. * Distance: A--200m--B--200m--C If spacing=250, it will pick the highest ranked location [B], not [A, C]. Note: Spacing works within the game object type itself, as well as the previous ones. Suppose three game object types, each with the following spacing: * X: 400m, Y: undefined, Z: 200m. 1. Add locations for X, within 400m of each other. 2. Add locations for Y, without any spacing. 3. Finally, add locations for Z within 200m of each other as well X and Y. The distance diagram between those locations end up as: * From->To. * X->X: 400m * Y->X, Y->Y: unspecified. * Z->X, Z->Y, Z->Z: 200m.',
)
pointType: Optional[PointType] = Field(
None,
description='Specifies whether the minimum spacing constraint applies to the center-point or to the snapped point of playable locations. The default value is `CENTER_POINT`. If a snapped point is not available for a playable location, its center-point is used instead. Set this to the point type used in your game.',
)
class Platform(Enum):
PLATFORM_UNSPECIFIED = 'PLATFORM_UNSPECIFIED'
EDITOR = 'EDITOR'
MAC_OS = 'MAC_OS'
WINDOWS = 'WINDOWS'
LINUX = 'LINUX'
ANDROID = 'ANDROID'
IOS = 'IOS'
WEB_GL = 'WEB_GL'
class GoogleMapsUnityClientInfo(BaseModel):
apiClient: Optional[str] = Field(
None,
description='API client name and version. For example, the SDK calling the API. The exact format is up to the client.',
)
applicationId: Optional[str] = Field(
None,
description='Application ID, such as the package name on Android and the bundle identifier on iOS platforms.',
)
applicationVersion: Optional[str] = Field(
None,
description='Application version number, such as "1.2.3". The exact format is application-dependent.',
)
deviceModel: Optional[str] = Field(
None,
description='Device model as reported by the device. The exact format is platform-dependent.',
)
languageCode: Optional[str] = Field(
None,
description='Language code (in BCP-47 format) indicating the UI language of the client. Examples are "en", "en-US" or "ja-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.',
)
operatingSystem: Optional[str] = Field(
None,
description='Operating system name and version as reported by the OS. For example, "Mac OS X 10.10.4". The exact format is platform-dependent.',
)
operatingSystemBuild: Optional[str] = Field(
None,
description='Build number/version of the operating system. e.g., the contents of android.os.Build.ID in Android, or the contents of sysctl "kern.osversion" in iOS.',
)
platform: Optional[Platform] = Field(
None, description='Platform where the application is running.'
)
class GoogleTypeLatLng(BaseModel):
latitude: Optional[float] = Field(
None,
description='The latitude in degrees. It must be in the range [-90.0, +90.0].',
)
longitude: Optional[float] = Field(
None,
description='The longitude in degrees. It must be in the range [-180.0, +180.0].',
)
class FieldXgafv(Enum):
field_1 = '1'
field_2 = '2'
class Alt(Enum):
json = 'json'
media = 'media'
proto = 'proto'
class GoogleMapsPlayablelocationsV3LogImpressionsRequest(BaseModel):
clientInfo: Optional[GoogleMapsUnityClientInfo] = Field(
None,
description='Required. Information about the client device. For example, device model and operating system.',
)
impressions: Optional[List[GoogleMapsPlayablelocationsV3Impression]] = Field(
None,
description='Required. Impression event details. The maximum number of impression reports that you can log at once is 50.',
)
requestId: Optional[str] = Field(
None,
description='Required. A string that uniquely identifies the log impressions request. This allows you to detect duplicate requests. We recommend that you use UUIDs for this value. The value must not exceed 50 characters. You should reuse the `request_id` only when retrying a request in case of failure. In this case, the request must be identical to the one that failed.',
)
class GoogleMapsPlayablelocationsV3LogPlayerReportsRequest(BaseModel):
clientInfo: Optional[GoogleMapsUnityClientInfo] = Field(
None,
description='Required. Information about the client device (for example, device model and operating system).',
)
playerReports: Optional[List[GoogleMapsPlayablelocationsV3PlayerReport]] = Field(
None,
description='Required. Player reports. The maximum number of player reports that you can log at once is 50.',
)
requestId: Optional[str] = Field(
None,
description='Required. A string that uniquely identifies the log player reports request. This allows you to detect duplicate requests. We recommend that you use UUIDs for this value. The value must not exceed 50 characters. You should reuse the `request_id` only when retrying a request in the case of a failure. In that case, the request must be identical to the one that failed.',
)
class GoogleMapsPlayablelocationsV3SampleFilter(BaseModel):
includedTypes: Optional[List[str]] = Field(
None,
description='Restricts the set of playable locations to just the [types](/maps/documentation/gaming/tt/types) that you want.',
)
maxLocationCount: Optional[int] = Field(
None,
description='Specifies the maximum number of playable locations to return. This value must not be greater than 1000. The default value is 100. Only the top-ranking playable locations are returned.',
)
spacing: Optional[GoogleMapsPlayablelocationsV3SampleSpacingOptions] = Field(
None,
description='A set of options that control the spacing between playable locations. By default the minimum distance between locations is 200m.',
)
class GoogleMapsPlayablelocationsV3SamplePlayableLocation(BaseModel):
centerPoint: Optional[GoogleTypeLatLng] = Field(
None,
description='Required. The latitude and longitude associated with the center of the playable location. By default, the set of playable locations returned from SamplePlayableLocations use center-point coordinates.',
)
name: Optional[str] = Field(
None, description='Required. The name of this playable location.'
)
placeId: Optional[str] = Field(
None, description='A [place ID] (https://developers.google.com/places/place-id)'
)
plusCode: Optional[str] = Field(
None, description='A [plus code] (http://openlocationcode.com)'
)
snappedPoint: Optional[GoogleTypeLatLng] = Field(
None,
description="The playable location's coordinates, snapped to the sidewalk of the nearest road, if a nearby road exists.",
)
types: Optional[List[str]] = Field(
None,
description='A collection of [Playable Location Types](/maps/documentation/gaming/tt/types) for this playable location. The first type in the collection is the primary type. Type information might not be available for all playable locations.',
)
class GoogleMapsPlayablelocationsV3SamplePlayableLocationList(BaseModel):
locations: Optional[List[GoogleMapsPlayablelocationsV3SamplePlayableLocation]] = (
Field(
None, description='A list of playable locations for this game object type.'
)
)
class GoogleMapsPlayablelocationsV3SamplePlayableLocationsResponse(BaseModel):
locationsPerGameObjectType: Optional[
Dict[str, GoogleMapsPlayablelocationsV3SamplePlayableLocationList]
] = Field(
None,
description='Each PlayableLocation object corresponds to a game_object_type specified in the request.',
)
ttl: Optional[str] = Field(
None,
description='Required. Specifies the "time-to-live" for the set of playable locations. You can use this value to determine how long to cache the set of playable locations. After this length of time, your back-end game server should issue a new SamplePlayableLocations request to get a fresh set of playable locations (because for example, they might have been removed, a park might have closed for the day, a business might have closed permanently).',
)
class GoogleMapsPlayablelocationsV3SampleCriterion(BaseModel):
fieldsToReturn: Optional[str] = Field(
None,
description='Specifies which `PlayableLocation` fields are returned. `name` (which is used for logging impressions), `center_point` and `place_id` (or `plus_code`) are always returned. The following fields are omitted unless you specify them here: * snapped_point * types Note: The more fields you include, the more expensive in terms of data and associated latency your query will be.',
)
filter: Optional[GoogleMapsPlayablelocationsV3SampleFilter] = Field(
None,
description='Specifies filtering options, and specifies what will be included in the result set.',
)
gameObjectType: Optional[int] = Field(
None,
description='Required. An arbitrary, developer-defined identifier of the type of game object that the playable location is used for. This field allows you to specify criteria per game object type when searching for playable locations. You should assign a unique `game_object_type` ID across all `request_criteria` to represent a distinct type of game object. For example, 1=monster location, 2=powerup location. The response contains a map.',
)
class GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest(BaseModel):
areaFilter: Optional[GoogleMapsPlayablelocationsV3SampleAreaFilter] = Field(
None,
description='Required. Specifies the area to search within for playable locations.',
)
criteria: Optional[List[GoogleMapsPlayablelocationsV3SampleCriterion]] = Field(
None,
description='Required. Specifies one or more (up to 5) criteria for filtering the returned playable locations.',
)