sample

package
v0.0.0-...-6cb3ea0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SpacingOptions_PointType_name = map[int32]string{
		0: "POINT_TYPE_UNSPECIFIED",
		1: "CENTER_POINT",
		2: "SNAPPED_POINT",
	}
	SpacingOptions_PointType_value = map[string]int32{
		"POINT_TYPE_UNSPECIFIED": 0,
		"CENTER_POINT":           1,
		"SNAPPED_POINT":          2,
	}
)

Enum value maps for SpacingOptions_PointType.

View Source
var File_google_maps_playablelocations_v3_sample_resources_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AreaFilter

type AreaFilter struct {

	// 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)
	S2CellId uint64 `protobuf:"fixed64,1,opt,name=s2_cell_id,json=s2CellId,proto3" json:"s2_cell_id,omitempty"`
	// contains filtered or unexported fields
}

Specifies the area to search for playable locations.

func (*AreaFilter) Descriptor deprecated

func (*AreaFilter) Descriptor() ([]byte, []int)

Deprecated: Use AreaFilter.ProtoReflect.Descriptor instead.

func (*AreaFilter) GetS2CellId

func (x *AreaFilter) GetS2CellId() uint64

func (*AreaFilter) ProtoMessage

func (*AreaFilter) ProtoMessage()

func (*AreaFilter) ProtoReflect

func (x *AreaFilter) ProtoReflect() protoreflect.Message

func (*AreaFilter) Reset

func (x *AreaFilter) Reset()

func (*AreaFilter) String

func (x *AreaFilter) String() string

type Criterion

type Criterion struct {

	// 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<game_object_type, Response>.
	GameObjectType int32 `protobuf:"varint,1,opt,name=game_object_type,json=gameObjectType,proto3" json:"game_object_type,omitempty"`
	// Specifies filtering options, and specifies what will be included in the
	// result set.
	Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
	// 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.
	FieldsToReturn *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=fields_to_return,json=fieldsToReturn,proto3" json:"fields_to_return,omitempty"`
	// contains filtered or unexported fields
}

Encapsulates a filter criterion for searching for a set of playable locations.

func (*Criterion) Descriptor deprecated

func (*Criterion) Descriptor() ([]byte, []int)

Deprecated: Use Criterion.ProtoReflect.Descriptor instead.

func (*Criterion) GetFieldsToReturn

func (x *Criterion) GetFieldsToReturn() *fieldmaskpb.FieldMask

func (*Criterion) GetFilter

func (x *Criterion) GetFilter() *Filter

func (*Criterion) GetGameObjectType

func (x *Criterion) GetGameObjectType() int32

func (*Criterion) ProtoMessage

func (*Criterion) ProtoMessage()

func (*Criterion) ProtoReflect

func (x *Criterion) ProtoReflect() protoreflect.Message

func (*Criterion) Reset

func (x *Criterion) Reset()

func (*Criterion) String

func (x *Criterion) String() string

type Filter

type Filter struct {

	// 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.
	MaxLocationCount int32 `protobuf:"varint,1,opt,name=max_location_count,json=maxLocationCount,proto3" json:"max_location_count,omitempty"`
	// A set of options that control the spacing between playable locations. By
	// default the minimum distance between locations is 200m.
	Spacing *SpacingOptions `protobuf:"bytes,2,opt,name=spacing,proto3" json:"spacing,omitempty"`
	// Restricts the set of playable locations to just the
	// [types](/maps/tt/games/types) that you want.
	IncludedTypes []string `protobuf:"bytes,3,rep,name=included_types,json=includedTypes,proto3" json:"included_types,omitempty"`
	// contains filtered or unexported fields
}

Specifies the filters to use when searching for playable locations.

func (*Filter) Descriptor deprecated

func (*Filter) Descriptor() ([]byte, []int)

Deprecated: Use Filter.ProtoReflect.Descriptor instead.

func (*Filter) GetIncludedTypes

func (x *Filter) GetIncludedTypes() []string

func (*Filter) GetMaxLocationCount

func (x *Filter) GetMaxLocationCount() int32

func (*Filter) GetSpacing

func (x *Filter) GetSpacing() *SpacingOptions

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) ProtoReflect

func (x *Filter) ProtoReflect() protoreflect.Message

func (*Filter) Reset

func (x *Filter) Reset()

func (*Filter) String

func (x *Filter) String() string

type PlayableLocation

type PlayableLocation struct {

	// Required. The name of this playable location.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required.
	// Each location has one of the following identifiers:
	//
	// Types that are assignable to LocationId:
	//	*PlayableLocation_PlaceId
	//	*PlayableLocation_PlusCode
	LocationId isPlayableLocation_LocationId `protobuf_oneof:"location_id"`
	// A collection of [Playable Location Types](/maps/tt/games/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.
	Types []string `protobuf:"bytes,4,rep,name=types,proto3" json:"types,omitempty"`
	// Required. The latitude and longitude associated with the center of the
	// playable location.
	//
	// By default, the set of playable locations returned from
	// [SamplePlayableLocations][google.maps.playablelocations.v3.PlayableLocations.SamplePlayableLocations]
	// use center-point coordinates.
	CenterPoint *latlng.LatLng `protobuf:"bytes,5,opt,name=center_point,json=centerPoint,proto3" json:"center_point,omitempty"`
	// The playable location's coordinates, snapped to the sidewalk of the
	// nearest road, if a nearby road exists.
	SnappedPoint *latlng.LatLng `protobuf:"bytes,6,opt,name=snapped_point,json=snappedPoint,proto3" json:"snapped_point,omitempty"`
	// contains filtered or unexported fields
}

A geographical point suitable for placing game objects in location-based games.

func (*PlayableLocation) Descriptor deprecated

func (*PlayableLocation) Descriptor() ([]byte, []int)

Deprecated: Use PlayableLocation.ProtoReflect.Descriptor instead.

func (*PlayableLocation) GetCenterPoint

func (x *PlayableLocation) GetCenterPoint() *latlng.LatLng

func (*PlayableLocation) GetLocationId

func (m *PlayableLocation) GetLocationId() isPlayableLocation_LocationId

func (*PlayableLocation) GetName

func (x *PlayableLocation) GetName() string

func (*PlayableLocation) GetPlaceId

func (x *PlayableLocation) GetPlaceId() string

func (*PlayableLocation) GetPlusCode

func (x *PlayableLocation) GetPlusCode() string

func (*PlayableLocation) GetSnappedPoint

func (x *PlayableLocation) GetSnappedPoint() *latlng.LatLng

func (*PlayableLocation) GetTypes

func (x *PlayableLocation) GetTypes() []string

func (*PlayableLocation) ProtoMessage

func (*PlayableLocation) ProtoMessage()

func (*PlayableLocation) ProtoReflect

func (x *PlayableLocation) ProtoReflect() protoreflect.Message

func (*PlayableLocation) Reset

func (x *PlayableLocation) Reset()

func (*PlayableLocation) String

func (x *PlayableLocation) String() string

type PlayableLocationList

type PlayableLocationList struct {

	// A list of playable locations for this game object type.
	Locations []*PlayableLocation `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"`
	// contains filtered or unexported fields
}

A list of PlayableLocation objects that satisfies a single Criterion.

func (*PlayableLocationList) Descriptor deprecated

func (*PlayableLocationList) Descriptor() ([]byte, []int)

Deprecated: Use PlayableLocationList.ProtoReflect.Descriptor instead.

func (*PlayableLocationList) GetLocations

func (x *PlayableLocationList) GetLocations() []*PlayableLocation

func (*PlayableLocationList) ProtoMessage

func (*PlayableLocationList) ProtoMessage()

func (*PlayableLocationList) ProtoReflect

func (x *PlayableLocationList) ProtoReflect() protoreflect.Message

func (*PlayableLocationList) Reset

func (x *PlayableLocationList) Reset()

func (*PlayableLocationList) String

func (x *PlayableLocationList) String() string

type PlayableLocation_PlaceId

type PlayableLocation_PlaceId struct {
	// A [place ID] (https://developers.google.com/places/place-id)
	PlaceId string `protobuf:"bytes,2,opt,name=place_id,json=placeId,proto3,oneof"`
}

type PlayableLocation_PlusCode

type PlayableLocation_PlusCode struct {
	// A [plus code] (http://openlocationcode.com)
	PlusCode string `protobuf:"bytes,3,opt,name=plus_code,json=plusCode,proto3,oneof"`
}

type SpacingOptions

type SpacingOptions struct {

	// 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.
	MinSpacingMeters float64 `protobuf:"fixed64,1,opt,name=min_spacing_meters,json=minSpacingMeters,proto3" json:"min_spacing_meters,omitempty"`
	// 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.
	PointType SpacingOptions_PointType `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

A set of options that specifies the separation between playable locations.

func (*SpacingOptions) Descriptor deprecated

func (*SpacingOptions) Descriptor() ([]byte, []int)

Deprecated: Use SpacingOptions.ProtoReflect.Descriptor instead.

func (*SpacingOptions) GetMinSpacingMeters

func (x *SpacingOptions) GetMinSpacingMeters() float64

func (*SpacingOptions) GetPointType

func (x *SpacingOptions) GetPointType() SpacingOptions_PointType

func (*SpacingOptions) ProtoMessage

func (*SpacingOptions) ProtoMessage()

func (*SpacingOptions) ProtoReflect

func (x *SpacingOptions) ProtoReflect() protoreflect.Message

func (*SpacingOptions) Reset

func (x *SpacingOptions) Reset()

func (*SpacingOptions) String

func (x *SpacingOptions) String() string

type SpacingOptions_PointType

type SpacingOptions_PointType int32

Specifies whether the playable location's geographic coordinates (latitude and longitude) correspond to its center-point, or to its location snapped to the sidewalk of the nearest road.

const (
	// Unspecified point type. Do not use this value.
	SpacingOptions_POINT_TYPE_UNSPECIFIED SpacingOptions_PointType = 0
	// The geographic coordinates correspond to the center of the location.
	SpacingOptions_CENTER_POINT SpacingOptions_PointType = 1
	// The geographic coordinates correspond to the location snapped to the
	// sidewalk of the nearest road (when a nearby road exists).
	SpacingOptions_SNAPPED_POINT SpacingOptions_PointType = 2
)

func (SpacingOptions_PointType) Descriptor

func (SpacingOptions_PointType) Enum

func (SpacingOptions_PointType) EnumDescriptor deprecated

func (SpacingOptions_PointType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SpacingOptions_PointType.Descriptor instead.

func (SpacingOptions_PointType) Number

func (SpacingOptions_PointType) String

func (x SpacingOptions_PointType) String() string

func (SpacingOptions_PointType) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL