playablelocations

package
v0.0.0-...-324edc3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PlayerReport_BadLocationReason_name = map[int32]string{
		0: "BAD_LOCATION_REASON_UNSPECIFIED",
		1: "OTHER",
		2: "NOT_PEDESTRIAN_ACCESSIBLE",
		4: "NOT_OPEN_TO_PUBLIC",
		5: "PERMANENTLY_CLOSED",
		6: "TEMPORARILY_INACCESSIBLE",
	}
	PlayerReport_BadLocationReason_value = map[string]int32{
		"BAD_LOCATION_REASON_UNSPECIFIED": 0,
		"OTHER":                           1,
		"NOT_PEDESTRIAN_ACCESSIBLE":       2,
		"NOT_OPEN_TO_PUBLIC":              4,
		"PERMANENTLY_CLOSED":              5,
		"TEMPORARILY_INACCESSIBLE":        6,
	}
)

Enum value maps for PlayerReport_BadLocationReason.

View Source
var (
	Impression_ImpressionType_name = map[int32]string{
		0: "IMPRESSION_TYPE_UNSPECIFIED",
		1: "PRESENTED",
		2: "INTERACTED",
	}
	Impression_ImpressionType_value = map[string]int32{
		"IMPRESSION_TYPE_UNSPECIFIED": 0,
		"PRESENTED":                   1,
		"INTERACTED":                  2,
	}
)

Enum value maps for Impression_ImpressionType.

View Source
var File_google_maps_playablelocations_v3_playablelocations_proto protoreflect.FileDescriptor
View Source
var File_google_maps_playablelocations_v3_resources_proto protoreflect.FileDescriptor

Functions

func RegisterPlayableLocationsServer

func RegisterPlayableLocationsServer(s *grpc.Server, srv PlayableLocationsServer)

Types

type Impression

type Impression struct {

	// Required. The name of the playable location.
	LocationName string `protobuf:"bytes,1,opt,name=location_name,json=locationName,proto3" json:"location_name,omitempty"`
	// Required. The type of impression event.
	ImpressionType Impression_ImpressionType `` /* 168-byte string literal not displayed */
	// 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.
	GameObjectType int32 `protobuf:"varint,4,opt,name=game_object_type,json=gameObjectType,proto3" json:"game_object_type,omitempty"`
	// contains filtered or unexported fields
}

Encapsulates impression event details.

func (*Impression) Descriptor deprecated

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

Deprecated: Use Impression.ProtoReflect.Descriptor instead.

func (*Impression) GetGameObjectType

func (x *Impression) GetGameObjectType() int32

func (*Impression) GetImpressionType

func (x *Impression) GetImpressionType() Impression_ImpressionType

func (*Impression) GetLocationName

func (x *Impression) GetLocationName() string

func (*Impression) ProtoMessage

func (*Impression) ProtoMessage()

func (*Impression) ProtoReflect

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

func (*Impression) Reset

func (x *Impression) Reset()

func (*Impression) String

func (x *Impression) String() string

type Impression_ImpressionType

type Impression_ImpressionType int32

The type of impression event.

const (
	// Unspecified type. Do not use.
	Impression_IMPRESSION_TYPE_UNSPECIFIED Impression_ImpressionType = 0
	// The playable location was presented to a player.
	Impression_PRESENTED Impression_ImpressionType = 1
	// A player interacted with the playable location.
	Impression_INTERACTED Impression_ImpressionType = 2
)

func (Impression_ImpressionType) Descriptor

func (Impression_ImpressionType) Enum

func (Impression_ImpressionType) EnumDescriptor deprecated

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

Deprecated: Use Impression_ImpressionType.Descriptor instead.

func (Impression_ImpressionType) Number

func (Impression_ImpressionType) String

func (x Impression_ImpressionType) String() string

func (Impression_ImpressionType) Type

type LogImpressionsRequest

type LogImpressionsRequest struct {

	// Required. Impression event details. The maximum number of impression
	// reports that you can log at once is 50.
	Impressions []*Impression `protobuf:"bytes,1,rep,name=impressions,proto3" json:"impressions,omitempty"`
	// 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.
	RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Required. Information about the client device. For example, device model
	// and operating system.
	ClientInfo *unity.ClientInfo `protobuf:"bytes,3,opt,name=client_info,json=clientInfo,proto3" json:"client_info,omitempty"`
	// contains filtered or unexported fields
}

A request for logging impressions.

func (*LogImpressionsRequest) Descriptor deprecated

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

Deprecated: Use LogImpressionsRequest.ProtoReflect.Descriptor instead.

func (*LogImpressionsRequest) GetClientInfo

func (x *LogImpressionsRequest) GetClientInfo() *unity.ClientInfo

func (*LogImpressionsRequest) GetImpressions

func (x *LogImpressionsRequest) GetImpressions() []*Impression

func (*LogImpressionsRequest) GetRequestId

func (x *LogImpressionsRequest) GetRequestId() string

func (*LogImpressionsRequest) ProtoMessage

func (*LogImpressionsRequest) ProtoMessage()

func (*LogImpressionsRequest) ProtoReflect

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

func (*LogImpressionsRequest) Reset

func (x *LogImpressionsRequest) Reset()

func (*LogImpressionsRequest) String

func (x *LogImpressionsRequest) String() string

type LogImpressionsResponse

type LogImpressionsResponse struct {
	// contains filtered or unexported fields
}

A response for the [LogImpressions][google.maps.playablelocations.v3.PlayableLocations.LogImpressions] method. This method returns no data upon success.

func (*LogImpressionsResponse) Descriptor deprecated

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

Deprecated: Use LogImpressionsResponse.ProtoReflect.Descriptor instead.

func (*LogImpressionsResponse) ProtoMessage

func (*LogImpressionsResponse) ProtoMessage()

func (*LogImpressionsResponse) ProtoReflect

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

func (*LogImpressionsResponse) Reset

func (x *LogImpressionsResponse) Reset()

func (*LogImpressionsResponse) String

func (x *LogImpressionsResponse) String() string

type LogPlayerReportsRequest

type LogPlayerReportsRequest struct {

	// Required. Player reports. The maximum number of player reports that you can
	// log at once is 50.
	PlayerReports []*PlayerReport `protobuf:"bytes,1,rep,name=player_reports,json=playerReports,proto3" json:"player_reports,omitempty"`
	// 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.
	RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Required. Information about the client device (for example, device model
	// and operating system).
	ClientInfo *unity.ClientInfo `protobuf:"bytes,3,opt,name=client_info,json=clientInfo,proto3" json:"client_info,omitempty"`
	// contains filtered or unexported fields
}

A request for logging your player's bad location reports.

func (*LogPlayerReportsRequest) Descriptor deprecated

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

Deprecated: Use LogPlayerReportsRequest.ProtoReflect.Descriptor instead.

func (*LogPlayerReportsRequest) GetClientInfo

func (x *LogPlayerReportsRequest) GetClientInfo() *unity.ClientInfo

func (*LogPlayerReportsRequest) GetPlayerReports

func (x *LogPlayerReportsRequest) GetPlayerReports() []*PlayerReport

func (*LogPlayerReportsRequest) GetRequestId

func (x *LogPlayerReportsRequest) GetRequestId() string

func (*LogPlayerReportsRequest) ProtoMessage

func (*LogPlayerReportsRequest) ProtoMessage()

func (*LogPlayerReportsRequest) ProtoReflect

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

func (*LogPlayerReportsRequest) Reset

func (x *LogPlayerReportsRequest) Reset()

func (*LogPlayerReportsRequest) String

func (x *LogPlayerReportsRequest) String() string

type LogPlayerReportsResponse

type LogPlayerReportsResponse struct {
	// contains filtered or unexported fields
}

A response for the [LogPlayerReports][google.maps.playablelocations.v3.PlayableLocations.LogPlayerReports] method.

This method returns no data upon success.

func (*LogPlayerReportsResponse) Descriptor deprecated

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

Deprecated: Use LogPlayerReportsResponse.ProtoReflect.Descriptor instead.

func (*LogPlayerReportsResponse) ProtoMessage

func (*LogPlayerReportsResponse) ProtoMessage()

func (*LogPlayerReportsResponse) ProtoReflect

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

func (*LogPlayerReportsResponse) Reset

func (x *LogPlayerReportsResponse) Reset()

func (*LogPlayerReportsResponse) String

func (x *LogPlayerReportsResponse) String() string

type PlayableLocationsClient

type PlayableLocationsClient interface {
	// Returns a set of playable locations that lie within a specified area,
	// that satisfy optional filter criteria.
	//
	// Note: Identical `SamplePlayableLocations` requests can return different
	// results as the state of the world changes over time.
	SamplePlayableLocations(ctx context.Context, in *SamplePlayableLocationsRequest, opts ...grpc.CallOption) (*SamplePlayableLocationsResponse, error)
	// Logs bad playable location reports submitted by players.
	//
	// Reports are not partially saved; either all reports are saved and this
	// request succeeds, or no reports are saved, and this request fails.
	LogPlayerReports(ctx context.Context, in *LogPlayerReportsRequest, opts ...grpc.CallOption) (*LogPlayerReportsResponse, error)
	// Logs new events when playable locations are displayed, and when they are
	// interacted with.
	//
	// Impressions are not partially saved; either all impressions are saved and
	// this request succeeds, or no impressions are saved, and this request fails.
	LogImpressions(ctx context.Context, in *LogImpressionsRequest, opts ...grpc.CallOption) (*LogImpressionsResponse, error)
}

PlayableLocationsClient is the client API for PlayableLocations service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type PlayableLocationsServer

type PlayableLocationsServer interface {
	// Returns a set of playable locations that lie within a specified area,
	// that satisfy optional filter criteria.
	//
	// Note: Identical `SamplePlayableLocations` requests can return different
	// results as the state of the world changes over time.
	SamplePlayableLocations(context.Context, *SamplePlayableLocationsRequest) (*SamplePlayableLocationsResponse, error)
	// Logs bad playable location reports submitted by players.
	//
	// Reports are not partially saved; either all reports are saved and this
	// request succeeds, or no reports are saved, and this request fails.
	LogPlayerReports(context.Context, *LogPlayerReportsRequest) (*LogPlayerReportsResponse, error)
	// Logs new events when playable locations are displayed, and when they are
	// interacted with.
	//
	// Impressions are not partially saved; either all impressions are saved and
	// this request succeeds, or no impressions are saved, and this request fails.
	LogImpressions(context.Context, *LogImpressionsRequest) (*LogImpressionsResponse, error)
}

PlayableLocationsServer is the server API for PlayableLocations service.

type PlayerReport

type PlayerReport struct {

	// Required. The name of the playable location.
	LocationName string `protobuf:"bytes,1,opt,name=location_name,json=locationName,proto3" json:"location_name,omitempty"`
	// Required. One or more reasons why this playable location is considered bad.
	Reasons []PlayerReport_BadLocationReason `` /* 144-byte string literal not displayed */
	// Required. A free-form description detailing why the playable location is
	// considered bad.
	ReasonDetails string `protobuf:"bytes,3,opt,name=reason_details,json=reasonDetails,proto3" json:"reason_details,omitempty"`
	// 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.
	LanguageCode string `protobuf:"bytes,4,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
	// contains filtered or unexported fields
}

A report submitted by a player about a playable location that is considered inappropriate for use in the game.

func (*PlayerReport) Descriptor deprecated

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

Deprecated: Use PlayerReport.ProtoReflect.Descriptor instead.

func (*PlayerReport) GetLanguageCode

func (x *PlayerReport) GetLanguageCode() string

func (*PlayerReport) GetLocationName

func (x *PlayerReport) GetLocationName() string

func (*PlayerReport) GetReasonDetails

func (x *PlayerReport) GetReasonDetails() string

func (*PlayerReport) GetReasons

func (x *PlayerReport) GetReasons() []PlayerReport_BadLocationReason

func (*PlayerReport) ProtoMessage

func (*PlayerReport) ProtoMessage()

func (*PlayerReport) ProtoReflect

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

func (*PlayerReport) Reset

func (x *PlayerReport) Reset()

func (*PlayerReport) String

func (x *PlayerReport) String() string

type PlayerReport_BadLocationReason

type PlayerReport_BadLocationReason int32

The reason why the playable location is considered bad.

const (
	// Unspecified reason. Do not use.
	PlayerReport_BAD_LOCATION_REASON_UNSPECIFIED PlayerReport_BadLocationReason = 0
	// The reason isn't one of the reasons in this enumeration.
	PlayerReport_OTHER PlayerReport_BadLocationReason = 1
	// The playable location isn't accessible to pedestrians. For example, if
	// it's in the middle of a highway.
	PlayerReport_NOT_PEDESTRIAN_ACCESSIBLE PlayerReport_BadLocationReason = 2
	// The playable location isn't open to the public. For example, a private
	// office building.
	PlayerReport_NOT_OPEN_TO_PUBLIC PlayerReport_BadLocationReason = 4
	// The playable location is permanently closed. For example, when a business
	// has been shut down.
	PlayerReport_PERMANENTLY_CLOSED PlayerReport_BadLocationReason = 5
	// The playable location is temporarily inaccessible. For example, when a
	// business has closed for renovations.
	PlayerReport_TEMPORARILY_INACCESSIBLE PlayerReport_BadLocationReason = 6
)

func (PlayerReport_BadLocationReason) Descriptor

func (PlayerReport_BadLocationReason) Enum

func (PlayerReport_BadLocationReason) EnumDescriptor deprecated

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

Deprecated: Use PlayerReport_BadLocationReason.Descriptor instead.

func (PlayerReport_BadLocationReason) Number

func (PlayerReport_BadLocationReason) String

func (PlayerReport_BadLocationReason) Type

type SamplePlayableLocationsRequest

type SamplePlayableLocationsRequest struct {

	// Required. Specifies the area to search within for playable locations.
	AreaFilter *sample.AreaFilter `protobuf:"bytes,1,opt,name=area_filter,json=areaFilter,proto3" json:"area_filter,omitempty"`
	// Required. Specifies one or more (up to 5) criteria for filtering the
	// returned playable locations.
	Criteria []*sample.Criterion `protobuf:"bytes,2,rep,name=criteria,proto3" json:"criteria,omitempty"`
	// contains filtered or unexported fields
}

Life of a query:

- When a game starts in a new location, your game server issues a [SamplePlayableLocations][google.maps.playablelocations.v3.PlayableLocations.SamplePlayableLocations] request. The request specifies the S2 cell, and contains one or more "criteria" for filtering:

- Criterion 0: i locations for long-lived bases, or level 0 monsters, or... - Criterion 1: j locations for short-lived bases, or level 1 monsters, ... - Criterion 2: k locations for random objects. - etc (up to 5 criterion may be specified).

`PlayableLocationList` will then contain mutually exclusive lists of `PlayableLocation` objects that satisfy each of the criteria. Think of it as a collection of real-world locations that you can then associate with your game state.

Note: These points are impermanent in nature. E.g, parks can close, and places can be removed.

The response specifies how long you can expect the playable locations to last. Once they expire, you should query the `samplePlayableLocations` API again to get a fresh view of the real world.

func (*SamplePlayableLocationsRequest) Descriptor deprecated

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

Deprecated: Use SamplePlayableLocationsRequest.ProtoReflect.Descriptor instead.

func (*SamplePlayableLocationsRequest) GetAreaFilter

func (x *SamplePlayableLocationsRequest) GetAreaFilter() *sample.AreaFilter

func (*SamplePlayableLocationsRequest) GetCriteria

func (x *SamplePlayableLocationsRequest) GetCriteria() []*sample.Criterion

func (*SamplePlayableLocationsRequest) ProtoMessage

func (*SamplePlayableLocationsRequest) ProtoMessage()

func (*SamplePlayableLocationsRequest) ProtoReflect

func (*SamplePlayableLocationsRequest) Reset

func (x *SamplePlayableLocationsRequest) Reset()

func (*SamplePlayableLocationsRequest) String

type SamplePlayableLocationsResponse

type SamplePlayableLocationsResponse struct {

	// Each PlayableLocation object corresponds to a game_object_type specified
	// in the request.
	LocationsPerGameObjectType map[int32]*sample.PlayableLocationList `` /* 234-byte string literal not displayed */
	// 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][google.maps.playablelocations.v3.PlayableLocations.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).
	Ttl *durationpb.Duration `protobuf:"bytes,9,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// contains filtered or unexported fields
}

Response for the [SamplePlayableLocations][google.maps.playablelocations.v3.PlayableLocations.SamplePlayableLocations] method.

func (*SamplePlayableLocationsResponse) Descriptor deprecated

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

Deprecated: Use SamplePlayableLocationsResponse.ProtoReflect.Descriptor instead.

func (*SamplePlayableLocationsResponse) GetLocationsPerGameObjectType

func (x *SamplePlayableLocationsResponse) GetLocationsPerGameObjectType() map[int32]*sample.PlayableLocationList

func (*SamplePlayableLocationsResponse) GetTtl

func (*SamplePlayableLocationsResponse) ProtoMessage

func (*SamplePlayableLocationsResponse) ProtoMessage()

func (*SamplePlayableLocationsResponse) ProtoReflect

func (*SamplePlayableLocationsResponse) Reset

func (*SamplePlayableLocationsResponse) String

type UnimplementedPlayableLocationsServer

type UnimplementedPlayableLocationsServer struct {
}

UnimplementedPlayableLocationsServer can be embedded to have forward compatible implementations.

func (*UnimplementedPlayableLocationsServer) LogImpressions

func (*UnimplementedPlayableLocationsServer) LogPlayerReports

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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