Skip to content

Commit 7467f29

Browse files
Google APIscopybara-github
authored andcommitted
chore: migrate maps/playablelocations to the PHP microgenerator
Committer: @miraleung PiperOrigin-RevId: 373589757
1 parent b29fb6b commit 7467f29

5 files changed

Lines changed: 55 additions & 58 deletions

File tree

google/maps/playablelocations/v3/BUILD.bazel

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,14 @@ go_gapic_assembly_pkg(
148148

149149
##############################################################################
150150
# PHP
151+
# DO NOT OVERRIDE this PHP microgenerator section with autogenerated rules.
151152
##############################################################################
152153
load(
153154
"@com_google_googleapis_imports//:imports.bzl",
154-
"php_gapic_assembly_pkg",
155-
"php_gapic_library",
156-
"php_grpc_library",
157-
"php_proto_library",
155+
php_gapic_assembly_pkg = "php_gapic_assembly_pkg2",
156+
php_gapic_library = "php_gapic_library2",
157+
php_grpc_library = "php_grpc_library2",
158+
php_proto_library = "php_proto_library2",
158159
)
159160

160161
php_proto_library(
@@ -170,10 +171,7 @@ php_grpc_library(
170171

171172
php_gapic_library(
172173
name = "playablelocations_php_gapic",
173-
src = ":playablelocations_proto_with_info",
174-
gapic_yaml = "playablelocations_gapic.yaml",
175-
package = "google.maps.playablelocations.v3",
176-
service_yaml = "playablelocations_v3.yaml",
174+
srcs = [":playablelocations_proto_with_info"],
177175
deps = [
178176
":playablelocations_php_grpc",
179177
":playablelocations_php_proto",

google/maps/playablelocations/v3/playablelocations.proto

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ option go_package = "google.golang.org/genproto/googleapis/maps/playablelocation
2929
option java_multiple_files = true;
3030
option java_outer_classname = "PlayableLocationsProto";
3131
option java_package = "com.google.maps.playablelocations.v3";
32+
option php_namespace = "Google\\Maps\\PlayableLocations\\V3";
3233
option objc_class_prefix = "GMPL";
3334

3435
// The Playable Locations API for v3.
@@ -40,7 +41,8 @@ service PlayableLocations {
4041
//
4142
// Note: Identical `SamplePlayableLocations` requests can return different
4243
// results as the state of the world changes over time.
43-
rpc SamplePlayableLocations(SamplePlayableLocationsRequest) returns (SamplePlayableLocationsResponse) {
44+
rpc SamplePlayableLocations(SamplePlayableLocationsRequest)
45+
returns (SamplePlayableLocationsResponse) {
4446
option (google.api.http) = {
4547
post: "/v3:samplePlayableLocations"
4648
body: "*"
@@ -51,7 +53,8 @@ service PlayableLocations {
5153
//
5254
// Reports are not partially saved; either all reports are saved and this
5355
// request succeeds, or no reports are saved, and this request fails.
54-
rpc LogPlayerReports(LogPlayerReportsRequest) returns (LogPlayerReportsResponse) {
56+
rpc LogPlayerReports(LogPlayerReportsRequest)
57+
returns (LogPlayerReportsResponse) {
5558
option (google.api.http) = {
5659
post: "/v3:logPlayerReports"
5760
body: "*"
@@ -97,11 +100,13 @@ service PlayableLocations {
97100
// again to get a fresh view of the real world.
98101
message SamplePlayableLocationsRequest {
99102
// Required. Specifies the area to search within for playable locations.
100-
google.maps.playablelocations.v3.sample.AreaFilter area_filter = 1 [(google.api.field_behavior) = REQUIRED];
103+
google.maps.playablelocations.v3.sample.AreaFilter area_filter = 1
104+
[(google.api.field_behavior) = REQUIRED];
101105

102106
// Required. Specifies one or more (up to 5) criteria for filtering the
103107
// returned playable locations.
104-
repeated google.maps.playablelocations.v3.sample.Criterion criteria = 2 [(google.api.field_behavior) = REQUIRED];
108+
repeated google.maps.playablelocations.v3.sample.Criterion criteria = 2
109+
[(google.api.field_behavior) = REQUIRED];
105110
}
106111

107112
//
@@ -111,11 +116,13 @@ message SamplePlayableLocationsRequest {
111116
message SamplePlayableLocationsResponse {
112117
// Each PlayableLocation object corresponds to a game_object_type specified
113118
// in the request.
114-
map<int32, google.maps.playablelocations.v3.sample.PlayableLocationList> locations_per_game_object_type = 1;
119+
map<int32, google.maps.playablelocations.v3.sample.PlayableLocationList>
120+
locations_per_game_object_type = 1;
115121

116-
// Required. Specifies the "time-to-live" for the set of playable locations. You can use
117-
// this value to determine how long to cache the set of playable locations.
118-
// After this length of time, your back-end game server should issue a new
122+
// Required. Specifies the "time-to-live" for the set of playable locations.
123+
// You can use this value to determine how long to cache the set of playable
124+
// locations. After this length of time, your back-end game server should
125+
// issue a new
119126
// [SamplePlayableLocations][google.maps.playablelocations.v3.PlayableLocations.SamplePlayableLocations]
120127
// request to get a fresh set of playable locations (because for example, they
121128
// might have been removed, a park might have closed for the day, a
@@ -125,54 +132,55 @@ message SamplePlayableLocationsResponse {
125132

126133
// A request for logging your player's bad location reports.
127134
message LogPlayerReportsRequest {
128-
// Required. Player reports. The maximum number of player reports that you can log at
129-
// once is 50.
130-
repeated PlayerReport player_reports = 1 [(google.api.field_behavior) = REQUIRED];
131-
132-
// Required. A string that uniquely identifies the log player reports request. This
133-
// allows you to detect duplicate requests. We recommend that you use UUIDs
134-
// for this value. The value must not exceed 50 characters.
135+
// Required. Player reports. The maximum number of player reports that you can
136+
// log at once is 50.
137+
repeated PlayerReport player_reports = 1
138+
[(google.api.field_behavior) = REQUIRED];
139+
140+
// Required. A string that uniquely identifies the log player reports request.
141+
// This allows you to detect duplicate requests. We recommend that you use
142+
// UUIDs for this value. The value must not exceed 50 characters.
135143
//
136144
// You should reuse the `request_id` only when retrying a request in the case
137145
// of a failure. In that case, the request must be identical to the one that
138146
// failed.
139147
string request_id = 2 [(google.api.field_behavior) = REQUIRED];
140148

141-
// Required. Information about the client device (for example, device model and
142-
// operating system).
143-
google.maps.unity.ClientInfo client_info = 3 [(google.api.field_behavior) = REQUIRED];
149+
// Required. Information about the client device (for example, device model
150+
// and operating system).
151+
google.maps.unity.ClientInfo client_info = 3
152+
[(google.api.field_behavior) = REQUIRED];
144153
}
145154

146-
// A response for the [LogPlayerReports][google.maps.playablelocations.v3.PlayableLocations.LogPlayerReports]
155+
// A response for the
156+
// [LogPlayerReports][google.maps.playablelocations.v3.PlayableLocations.LogPlayerReports]
147157
// method.
148158
//
149159
// This method returns no data upon success.
150-
message LogPlayerReportsResponse {
151-
152-
}
160+
message LogPlayerReportsResponse {}
153161

154162
// A request for logging impressions.
155163
message LogImpressionsRequest {
156-
// Required. Impression event details. The maximum number of impression reports that you
157-
// can log at once is 50.
164+
// Required. Impression event details. The maximum number of impression
165+
// reports that you can log at once is 50.
158166
repeated Impression impressions = 1 [(google.api.field_behavior) = REQUIRED];
159167

160-
// Required. A string that uniquely identifies the log impressions request. This allows
161-
// you to detect duplicate requests. We recommend that you use UUIDs for this
162-
// value. The value must not exceed 50 characters.
168+
// Required. A string that uniquely identifies the log impressions request.
169+
// This allows you to detect duplicate requests. We recommend that you use
170+
// UUIDs for this value. The value must not exceed 50 characters.
163171
//
164172
// You should reuse the `request_id` only when retrying a request in case of
165173
// failure. In this case, the request must be identical to the one that
166174
// failed.
167175
string request_id = 2 [(google.api.field_behavior) = REQUIRED];
168176

169-
// Required. Information about the client device. For example, device model and
170-
// operating system.
171-
google.maps.unity.ClientInfo client_info = 3 [(google.api.field_behavior) = REQUIRED];
177+
// Required. Information about the client device. For example, device model
178+
// and operating system.
179+
google.maps.unity.ClientInfo client_info = 3
180+
[(google.api.field_behavior) = REQUIRED];
172181
}
173182

174-
// A response for the [LogImpressions][google.maps.playablelocations.v3.PlayableLocations.LogImpressions] method.
175-
// This method returns no data upon success.
176-
message LogImpressionsResponse {
177-
178-
}
183+
// A response for the
184+
// [LogImpressions][google.maps.playablelocations.v3.PlayableLocations.LogImpressions]
185+
// method. This method returns no data upon success.
186+
message LogImpressionsResponse {}
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,2 @@
11
type: com.google.api.codegen.ConfigProto
22
config_schema_version: 2.0.0
3-
language_settings:
4-
go:
5-
package_name: developers.google.com/maps/go/playablelocations/v3
6-
csharp:
7-
package_name: Google.Maps.PlayableLocations.V3
8-
ruby:
9-
package_name: Google::Maps::PlayableLocations::V3
10-
php:
11-
package_name: Google\Maps\PlayableLocations\V3
12-
nodejs:
13-
package_name: playablelocations.v3
14-
domain_layer_location: googlemaps

google/maps/playablelocations/v3/resources.proto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ option go_package = "google.golang.org/genproto/googleapis/maps/playablelocation
2525
option java_multiple_files = true;
2626
option java_outer_classname = "ResourcesProto";
2727
option java_package = "com.google.maps.playablelocations.v3";
28+
option php_namespace = "Google\\Maps\\PlayableLocations\\V3";
2829
option objc_class_prefix = "GMPL";
2930

3031
// A report submitted by a player about a playable location that is considered
@@ -59,7 +60,8 @@ message PlayerReport {
5960
string location_name = 1 [(google.api.field_behavior) = REQUIRED];
6061

6162
// Required. One or more reasons why this playable location is considered bad.
62-
repeated BadLocationReason reasons = 2 [(google.api.field_behavior) = REQUIRED];
63+
repeated BadLocationReason reasons = 2
64+
[(google.api.field_behavior) = REQUIRED];
6365

6466
// Required. A free-form description detailing why the playable location is
6567
// considered bad.

google/maps/playablelocations/v3/sample/BUILD.bazel

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ go_proto_library(
6161

6262
##############################################################################
6363
# PHP
64+
# DO NOT OVERRIDE this PHP microgenerator section with autogenerated rules.
6465
##############################################################################
6566
load(
6667
"@com_google_googleapis_imports//:imports.bzl",
67-
"php_grpc_library",
68-
"php_proto_library",
68+
php_grpc_library = "php_grpc_library2",
69+
php_proto_library = "php_proto_library2",
6970
)
7071

7172
php_proto_library(

0 commit comments

Comments
 (0)