Skip to content

Commit 819f798

Browse files
Google APIscopybara-github
authored andcommitted
feat: Introduce QuotaService for CSS API
docs: A comment for field `name` in message `.google.shopping.css.v1.CssProductInput` is changed docs: A comment for field `name` in message `.google.shopping.css.v1.DeleteCssProductInputRequest` is changed PiperOrigin-RevId: 745220517
1 parent 9df9ac7 commit 819f798

5 files changed

Lines changed: 180 additions & 21 deletions

File tree

google/shopping/css/v1/BUILD.bazel

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
# * extra_protoc_file_parameters
1010
# The complete list of preserved parameters can be found in the source code.
1111

12+
# buildifier: disable=load-on-top
13+
1214
# This is an API workspace, having public visibility by default makes perfect sense.
1315
package(default_visibility = ["//visibility:public"])
1416

1517
##############################################################################
1618
# Common
1719
##############################################################################
18-
load("@rules_proto//proto:defs.bzl", "proto_library")
20+
# buildifier: disable=same-origin-load
1921
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
22+
load("@rules_proto//proto:defs.bzl", "proto_library")
2023

2124
proto_library(
2225
name = "css_proto",
@@ -26,13 +29,14 @@ proto_library(
2629
"css_product_common.proto",
2730
"css_product_inputs.proto",
2831
"css_products.proto",
32+
"quota.proto",
2933
],
3034
deps = [
3135
"//google/api:annotations_proto",
3236
"//google/api:client_proto",
3337
"//google/api:field_behavior_proto",
3438
"//google/api:resource_proto",
35-
"//google/shopping/type:type_proto", # Manual fix. Original :types_proto
39+
"//google/shopping/type:type_proto", # Manual fix. Original :types_proto
3640
"@com_google_protobuf//:empty_proto",
3741
"@com_google_protobuf//:field_mask_proto",
3842
"@com_google_protobuf//:timestamp_proto",
@@ -50,6 +54,7 @@ proto_library_with_info(
5054
##############################################################################
5155
# Java
5256
##############################################################################
57+
# buildifier: disable=same-origin-load
5358
load(
5459
"@com_google_googleapis_imports//:imports.bzl",
5560
"java_gapic_assembly_gradle_pkg",
@@ -84,7 +89,7 @@ java_gapic_library(
8489
deps = [
8590
":css_java_proto",
8691
"//google/api:api_java_proto",
87-
"//google/shopping/type:type_java_proto", # Added manually
92+
"//google/shopping/type:type_java_proto", # Added manually
8893
],
8994
)
9095

@@ -99,27 +104,30 @@ java_gapic_test(
99104
"com.google.shopping.css.v1.CssProductInputsServiceClientTest",
100105
"com.google.shopping.css.v1.CssProductsServiceClientHttpJsonTest",
101106
"com.google.shopping.css.v1.CssProductsServiceClientTest",
107+
"com.google.shopping.css.v1.QuotaServiceClientHttpJsonTest",
108+
"com.google.shopping.css.v1.QuotaServiceClientTest",
102109
],
103110
runtime_deps = [":css_java_gapic_test"],
104111
)
105112

106113
# Open Source Packages
107114
java_gapic_assembly_gradle_pkg(
108115
name = "google-cloud-shopping-css-v1-java",
116+
include_samples = True,
109117
transport = "grpc+rest",
110118
deps = [
111119
":css_java_gapic",
112120
":css_java_grpc",
113121
":css_java_proto",
114122
":css_proto",
115-
"//google/shopping/type:type_java_proto", # Added manually
123+
"//google/shopping/type:type_java_proto", # Added manually
116124
],
117-
include_samples = True,
118125
)
119126

120127
##############################################################################
121128
# Go
122129
##############################################################################
130+
# buildifier: disable=same-origin-load
123131
load(
124132
"@com_google_googleapis_imports//:imports.bzl",
125133
"go_gapic_assembly_pkg",
@@ -134,15 +142,15 @@ go_proto_library(
134142
protos = [":css_proto"],
135143
deps = [
136144
"//google/api:annotations_go_proto",
137-
"//google/shopping/type:type_go_proto", # Added manually
145+
"//google/shopping/type:type_go_proto", # Added manually
138146
],
139147
)
140148

141149
go_gapic_library(
142150
name = "css_go_gapic",
143151
srcs = [":css_proto_with_info"],
144152
grpc_service_config = "css_grpc_service_config.json",
145-
importpath = "cloud.google.com/go/shopping/css/apiv1;css", # Manual fix
153+
importpath = "cloud.google.com/go/shopping/css/apiv1;css", # Manual fix
146154
metadata = True,
147155
release_level = "beta",
148156
rest_numeric_enums = True,
@@ -158,27 +166,29 @@ go_gapic_assembly_pkg(
158166
name = "gapi-cloud-shopping-css-v1-go",
159167
deps = [
160168
":css_go_gapic",
161-
":css_go_gapic_srcjar-test.srcjar",
162169
":css_go_gapic_srcjar-metadata.srcjar",
163170
":css_go_gapic_srcjar-snippets.srcjar",
171+
":css_go_gapic_srcjar-test.srcjar",
164172
":css_go_proto",
165-
"//google/api:api_go_proto", # Added manually
166-
"//google/shopping/type:type_go_proto", # Added manually
173+
"//google/api:api_go_proto", # Added manually
174+
"//google/shopping/type:type_go_proto", # Added manually
167175
],
168176
)
169177

170178
##############################################################################
171179
# Python
172180
##############################################################################
181+
# buildifier: disable=same-origin-load
173182
load(
174183
"@com_google_googleapis_imports//:imports.bzl",
175184
"py_gapic_assembly_pkg",
176185
"py_gapic_library",
186+
"py_import", # Added manually
177187
"py_test",
178-
"py_import",
179188
)
180189

181-
py_import( # Added manually
190+
py_import(
191+
# Added manually
182192
name = "shopping_type",
183193
srcs = [
184194
"//google/shopping/type:type_py_gapic",
@@ -189,12 +199,12 @@ py_gapic_library(
189199
name = "css_py_gapic",
190200
srcs = [":css_proto"],
191201
grpc_service_config = "css_grpc_service_config.json",
192-
opt_args = ["proto-plus-deps=google.shopping.type"], # Added manually
202+
opt_args = ["proto-plus-deps=google.shopping.type"], # Added manually
193203
rest_numeric_enums = True,
194204
service_yaml = "css_v1.yaml",
195205
transport = "grpc+rest",
196206
deps = [
197-
":shopping_type", # Added manually
207+
":shopping_type", # Added manually
198208
],
199209
)
200210

@@ -219,6 +229,7 @@ py_gapic_assembly_pkg(
219229
##############################################################################
220230
# PHP
221231
##############################################################################
232+
# buildifier: disable=same-origin-load
222233
load(
223234
"@com_google_googleapis_imports//:imports.bzl",
224235
"php_gapic_assembly_pkg",
@@ -235,8 +246,8 @@ php_gapic_library(
235246
name = "css_php_gapic",
236247
srcs = [":css_proto_with_info"],
237248
grpc_service_config = "css_grpc_service_config.json",
238-
rest_numeric_enums = True,
239249
migration_mode = "NEW_SURFACE_ONLY",
250+
rest_numeric_enums = True,
240251
service_yaml = "css_v1.yaml",
241252
transport = "grpc+rest",
242253
deps = [
@@ -256,6 +267,7 @@ php_gapic_assembly_pkg(
256267
##############################################################################
257268
# Node.js
258269
##############################################################################
270+
# buildifier: disable=same-origin-load
259271
load(
260272
"@com_google_googleapis_imports//:imports.bzl",
261273
"nodejs_gapic_assembly_pkg",
@@ -280,17 +292,18 @@ nodejs_gapic_assembly_pkg(
280292
deps = [
281293
":css_nodejs_gapic",
282294
":css_proto",
283-
"//google/shopping/type:type_proto", # Added manually
295+
"//google/shopping/type:type_proto", # Added manually
284296
],
285297
)
286298

287299
##############################################################################
288300
# Ruby
289301
##############################################################################
302+
# buildifier: disable=same-origin-load
290303
load(
291304
"@com_google_googleapis_imports//:imports.bzl",
292-
"ruby_gapic_assembly_pkg",
293305
"ruby_cloud_gapic_library",
306+
"ruby_gapic_assembly_pkg",
294307
"ruby_grpc_library",
295308
"ruby_proto_library",
296309
)
@@ -310,8 +323,8 @@ ruby_cloud_gapic_library(
310323
name = "css_ruby_gapic",
311324
srcs = [":css_proto_with_info"],
312325
extra_protoc_parameters = [
313-
"ruby-cloud-gem-name=google-shopping-css-v1",
314326
"ruby-cloud-extra-dependencies=google-shopping-type=>0.0+<2.a",
327+
"ruby-cloud-gem-name=google-shopping-css-v1",
315328
],
316329
grpc_service_config = "css_grpc_service_config.json",
317330
rest_numeric_enums = True,
@@ -336,6 +349,7 @@ ruby_gapic_assembly_pkg(
336349
##############################################################################
337350
# C#
338351
##############################################################################
352+
# buildifier: disable=same-origin-load
339353
load(
340354
"@com_google_googleapis_imports//:imports.bzl",
341355
"csharp_gapic_assembly_pkg",
@@ -346,7 +360,6 @@ load(
346360

347361
csharp_proto_library(
348362
name = "css_csharp_proto",
349-
extra_opts = [],
350363
deps = [":css_proto"],
351364
)
352365

@@ -383,6 +396,7 @@ csharp_gapic_assembly_pkg(
383396
##############################################################################
384397
# C++
385398
##############################################################################
399+
# buildifier: disable=same-origin-load
386400
load(
387401
"@com_google_googleapis_imports//:imports.bzl",
388402
"cc_grpc_library",

google/shopping/css/v1/css_grpc_service_config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
{
2222
"service": "google.shopping.css.v1.CssProductsService",
2323
"method": "ListCssProducts"
24+
},
25+
{
26+
"service": "google.shopping.css.v1.QuotaService",
27+
"method": "ListQuotaGroups"
2428
}
2529
],
2630
"timeout": "60s",

google/shopping/css/v1/css_product_inputs.proto

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ message CssProductInput {
9191

9292
// The name of the CSS Product input.
9393
// Format:
94-
// `accounts/{account}/cssProductInputs/{css_product_input}`
94+
// `accounts/{account}/cssProductInputs/{css_product_input}`, where the
95+
// last section `css_product_input` consists of 3 parts:
96+
// contentLanguage~feedLabel~offerId. Example:
97+
// accounts/123/cssProductInputs/de~DE~rawProvidedId123
9598
string name = 1;
9699

97100
// Output only. The name of the processed CSS Product.
@@ -205,7 +208,10 @@ message UpdateCssProductInputRequest {
205208
// Request message for the DeleteCssProductInput method.
206209
message DeleteCssProductInputRequest {
207210
// Required. The name of the CSS product input resource to delete.
208-
// Format: accounts/{account}/cssProductInputs/{css_product_input}
211+
// Format: accounts/{account}/cssProductInputs/{css_product_input}, where the
212+
// last section `css_product_input` consists of 3 parts:
213+
// contentLanguage~feedLabel~offerId. Example:
214+
// accounts/123/cssProductInputs/de~DE~rawProvidedId123
209215
string name = 1 [
210216
(google.api.field_behavior) = REQUIRED,
211217
(google.api.resource_reference) = {

google/shopping/css/v1/css_v1.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ apis:
88
- name: google.shopping.css.v1.AccountsService
99
- name: google.shopping.css.v1.CssProductInputsService
1010
- name: google.shopping.css.v1.CssProductsService
11+
- name: google.shopping.css.v1.QuotaService
1112

1213
documentation:
1314
summary: |-
@@ -36,6 +37,10 @@ authentication:
3637
oauth:
3738
canonical_scopes: |-
3839
https://www.googleapis.com/auth/content
40+
- selector: google.shopping.css.v1.QuotaService.ListQuotaGroups
41+
oauth:
42+
canonical_scopes: |-
43+
https://www.googleapis.com/auth/content
3944
4045
publishing:
4146
new_issue_uri: https://issuetracker.google.com/issues/new?component=826068&template=1564577

0 commit comments

Comments
 (0)