Skip to content

Commit 005df46

Browse files
Google APIscopybara-github
authored andcommitted
fix!: The type of an existing field time_zone is changed from message to string in message .google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest
fix!: An existing field `account_aggregation` is removed from message `.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest` fix!: Changed field behavior for an existing field `service` in message `.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest` fix!: Changed field behavior for an existing field `region_code` in message `.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest` fix!: Changed field behavior for an existing field `kind` in message `.google.shopping.merchant.accounts.v1beta.RetrieveLatestTermsOfServiceRequest` feat: A new field `account_aggregation` is added to message `.google.shopping.merchant.accounts.v1beta.CreateAndConfigureAccountRequest` feat: A new message `AccountAggregation` is added feat: A new service `AutofeedSettingsService` is added feat: A new message `AutofeedSettings` is added feat: A new resource_definition `merchantapi.googleapis.com/AutofeedSettings` is added feat: A new message `GetAutofeedSettingsRequest` is added feat: A new message `UpdateAutofeedSettingsRequest` is added feat: A new field `korean_business_registration_number` is added to message `.google.shopping.merchant.accounts.v1beta.BusinessInfo` PiperOrigin-RevId: 678841094
1 parent d36e288 commit 005df46

11 files changed

Lines changed: 251 additions & 41 deletions

google/shopping/merchant/accounts/v1beta/BUILD.bazel

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ proto_library(
2828
"account_tax.proto",
2929
"accountissue.proto",
3030
"accounts.proto",
31+
"accountservices.proto",
32+
"autofeedsettings.proto",
3133
"businessidentity.proto",
3234
"businessinfo.proto",
3335
"customerservice.proto",
@@ -49,7 +51,8 @@ proto_library(
4951
"//google/api:client_proto",
5052
"//google/api:field_behavior_proto",
5153
"//google/api:resource_proto",
52-
"//google/shopping/type:type_proto", # Manual fix. Original :types_proto
54+
# Manual edit: Types -> Type
55+
"//google/shopping/type:type_proto",
5356
"//google/type:date_proto",
5457
"//google/type:datetime_proto",
5558
"//google/type:interval_proto",
@@ -84,10 +87,7 @@ load(
8487

8588
java_proto_library(
8689
name = "accounts_java_proto",
87-
deps = [
88-
":accounts_proto",
89-
"//google/shopping/type:type_proto", # Added manually
90-
],
90+
deps = [":accounts_proto"],
9191
)
9292

9393
java_grpc_library(
@@ -122,6 +122,8 @@ java_gapic_test(
122122
"com.google.shopping.merchant.accounts.v1beta.AccountTaxServiceClientTest",
123123
"com.google.shopping.merchant.accounts.v1beta.AccountsServiceClientHttpJsonTest",
124124
"com.google.shopping.merchant.accounts.v1beta.AccountsServiceClientTest",
125+
"com.google.shopping.merchant.accounts.v1beta.AutofeedSettingsServiceClientHttpJsonTest",
126+
"com.google.shopping.merchant.accounts.v1beta.AutofeedSettingsServiceClientTest",
125127
"com.google.shopping.merchant.accounts.v1beta.BusinessIdentityServiceClientHttpJsonTest",
126128
"com.google.shopping.merchant.accounts.v1beta.BusinessIdentityServiceClientTest",
127129
"com.google.shopping.merchant.accounts.v1beta.BusinessInfoServiceClientHttpJsonTest",
@@ -151,14 +153,14 @@ java_gapic_test(
151153
# Open Source Packages
152154
java_gapic_assembly_gradle_pkg(
153155
name = "google-cloud-merchant-accounts-v1beta-java",
156+
include_samples = True,
154157
transport = "grpc+rest",
155158
deps = [
156159
":accounts_java_gapic",
157160
":accounts_java_grpc",
158161
":accounts_java_proto",
159162
":accounts_proto",
160163
],
161-
include_samples = True,
162164
)
163165

164166
##############################################################################
@@ -179,7 +181,8 @@ go_proto_library(
179181
protos = [":accounts_proto"],
180182
deps = [
181183
"//google/api:annotations_go_proto",
182-
"//google/shopping/type:type_go_proto", # Manual fix. Original :types_go_proto
184+
# Manual edit: Types -> Type
185+
"//google/shopping/type:type_go_proto",
183186
"//google/type:date_go_proto",
184187
"//google/type:datetime_go_proto",
185188
"//google/type:interval_go_proto",
@@ -208,9 +211,9 @@ go_gapic_assembly_pkg(
208211
name = "gapi-cloud-merchant-accounts-v1beta-go",
209212
deps = [
210213
":accounts_go_gapic",
211-
":accounts_go_gapic_srcjar-test.srcjar",
212214
":accounts_go_gapic_srcjar-metadata.srcjar",
213215
":accounts_go_gapic_srcjar-snippets.srcjar",
216+
":accounts_go_gapic_srcjar-test.srcjar",
214217
":accounts_go_proto",
215218
],
216219
)
@@ -239,9 +242,9 @@ py_gapic_library(
239242
srcs = [":accounts_proto"],
240243
grpc_service_config = "accounts_grpc_service_config.json",
241244
opt_args = [
242-
"proto-plus-deps=google.shopping.type", # Added manually
243-
"python-gapic-namespace=google.shopping",
245+
"proto-plus-deps=google.shopping.type",
244246
"python-gapic-name=merchant_accounts",
247+
"python-gapic-namespace=google.shopping",
245248
],
246249
rest_numeric_enums = True,
247250
service_yaml = "merchantapi_v1beta.yaml",
@@ -289,8 +292,8 @@ php_gapic_library(
289292
name = "accounts_php_gapic",
290293
srcs = [":accounts_proto_with_info"],
291294
grpc_service_config = "accounts_grpc_service_config.json",
292-
rest_numeric_enums = True,
293295
migration_mode = "NEW_SURFACE_ONLY",
296+
rest_numeric_enums = True,
294297
service_yaml = "merchantapi_v1beta.yaml",
295298
transport = "grpc+rest",
296299
deps = [
@@ -345,8 +348,8 @@ nodejs_gapic_assembly_pkg(
345348
# buildifier: disable=same-origin-load
346349
load(
347350
"@com_google_googleapis_imports//:imports.bzl",
348-
"ruby_gapic_assembly_pkg",
349351
"ruby_cloud_gapic_library",
352+
"ruby_gapic_assembly_pkg",
350353
"ruby_grpc_library",
351354
"ruby_proto_library",
352355
)
@@ -403,7 +406,6 @@ load(
403406

404407
csharp_proto_library(
405408
name = "accounts_csharp_proto",
406-
extra_opts = [],
407409
deps = [":accounts_proto"],
408410
)
409411

google/shopping/merchant/accounts/v1beta/accountissue.proto

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/shopping/type/types.proto";
24-
import "google/type/datetime.proto";
2524

2625
option go_package = "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb";
2726
option java_multiple_files = true;
@@ -142,7 +141,7 @@ message ListAccountIssuesRequest {
142141
// Optional. The [IANA](https://www.iana.org/time-zones) timezone used to
143142
// localize times in human-readable fields. For example 'America/Los_Angeles'.
144143
// If not set, 'America/Los_Angeles' will be used.
145-
google.type.TimeZone time_zone = 5 [(google.api.field_behavior) = OPTIONAL];
144+
string time_zone = 5 [(google.api.field_behavior) = OPTIONAL];
146145
}
147146

148147
// Response message for the `ListAccountIssues` method.

google/shopping/merchant/accounts/v1beta/accounts.proto

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/protobuf/empty.proto";
2424
import "google/protobuf/field_mask.proto";
25+
import "google/shopping/merchant/accounts/v1beta/accountservices.proto";
2526
import "google/shopping/merchant/accounts/v1beta/user.proto";
2627
import "google/type/datetime.proto";
2728

@@ -156,7 +157,10 @@ message GetAccountRequest {
156157
message CreateAndConfigureAccountRequest {
157158
// Reference to a Terms of Service resource.
158159
message AcceptTermsOfService {
159-
// Required. The resource name of the terms of service version.
160+
// Required. The resource name of the terms of service version in the format
161+
// `termsOfService/{version}`. To retrieve the latest version, use the
162+
// [termsOfService.retrieveLatest](/merchant/api/reference/rest/accounts_v1beta/termsOfService/retrieveLatest)
163+
// method.
160164
string name = 1 [
161165
(google.api.field_behavior) = REQUIRED,
162166
(google.api.resource_reference) = {
@@ -173,12 +177,12 @@ message CreateAndConfigureAccountRequest {
173177
// Additional instructions to add account services during creation of the
174178
// account.
175179
message AddAccountService {
176-
// Currently only supports
177-
// [Multi-client](https://support.google.com/merchants/answer/188487)
178-
// parent account type.
180+
// The service type to be added.
179181
oneof service_type {
180-
// The provider is an aggregator for the account.
181-
google.protobuf.Empty account_aggregation = 2;
182+
// The provider is an
183+
// [aggregator](https://support.google.com/merchants/answer/188487) for
184+
// the account. Payload for service type Account Aggregation.
185+
AccountAggregation account_aggregation = 103;
182186
}
183187

184188
// Optional. The provider of the service.
@@ -202,11 +206,14 @@ message CreateAndConfigureAccountRequest {
202206
optional AcceptTermsOfService accept_terms_of_service = 3
203207
[(google.api.field_behavior) = OPTIONAL];
204208

205-
// Optional. If specified, an account service between the account to be
206-
// created and the provider account is initialized as part of the
207-
// creation.
209+
// Required. An account service between the account to be created and the
210+
// provider account is initialized as part of the creation. At least one such
211+
// service needs to be provided. Currently exactly one of these needs to be
212+
// `account_aggregation`, which means you can only create sub accounts, not
213+
// standalone account through this method. Additional `account_management` or
214+
// `product_management` services may be provided.
208215
repeated AddAccountService service = 4
209-
[(google.api.field_behavior) = OPTIONAL];
216+
[(google.api.field_behavior) = REQUIRED];
210217
}
211218

212219
// Request message for the `DeleteAccount` method.

google/shopping/merchant/accounts/v1beta/accounts_grpc_service_config.json

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,46 @@
66
"service": "google.shopping.merchant.accounts.v1beta.AccountsService"
77
},
88
{
9-
"service": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService"
9+
"service": "google.shopping.merchant.accounts.v1beta.AccountIssueService"
10+
},
11+
{
12+
"service": "google.shopping.merchant.accounts.v1beta.AccountTaxService"
13+
},
14+
{
15+
"service": "google.shopping.merchant.accounts.v1beta.AutofeedSettingsService"
16+
},
17+
{
18+
"service": "google.shopping.merchant.accounts.v1beta.BusinessIdentityService"
19+
},
20+
{
21+
"service": "google.shopping.merchant.accounts.v1beta.BusinessInfoService"
22+
},
23+
{
24+
"service": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService"
25+
},
26+
{
27+
"service": "google.shopping.merchant.accounts.v1beta.HomepageService"
28+
},
29+
{
30+
"service": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService"
1031
},
1132
{
12-
"service": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService"
33+
"service": "google.shopping.merchant.accounts.v1beta.ProgramsService"
34+
},
35+
{
36+
"service": "google.shopping.merchant.accounts.v1beta.RegionsService"
1337
},
1438
{
1539
"service": "google.shopping.merchant.accounts.v1beta.ShippingSettingService"
40+
},
41+
{
42+
"service": "google.shopping.merchant.accounts.v1beta.TermsOfServiceAgreementStateService"
43+
},
44+
{
45+
"service": "google.shopping.merchant.accounts.v1beta.TermsOfServiceService"
46+
},
47+
{
48+
"service": "google.shopping.merchant.accounts.v1beta.UserService"
1649
}
1750
],
1851
"timeout": "60s",
@@ -21,9 +54,7 @@
2154
"initialBackoff": "1s",
2255
"maxBackoff": "10s",
2356
"backoffMultiplier": 1.3,
24-
"retryableStatusCodes": [
25-
"UNAVAILABLE"
26-
]
57+
"retryableStatusCodes": ["UNAVAILABLE"]
2758
}
2859
}
2960
]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.shopping.merchant.accounts.v1beta;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
23+
24+
option go_package = "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "AccountServicesProto";
27+
option java_package = "com.google.shopping.merchant.accounts.v1beta";
28+
29+
// `AccountAggregation` payload.
30+
message AccountAggregation {}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.shopping.merchant.accounts.v1beta;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
23+
import "google/protobuf/field_mask.proto";
24+
25+
option go_package = "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb";
26+
option java_multiple_files = true;
27+
option java_outer_classname = "AutofeedSettingsProto";
28+
option java_package = "com.google.shopping.merchant.accounts.v1beta";
29+
30+
// Service to support
31+
// [autofeed](https://support.google.com/merchants/answer/7538732) setting.
32+
service AutofeedSettingsService {
33+
option (google.api.default_host) = "merchantapi.googleapis.com";
34+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/content";
35+
36+
// Retrieves the autofeed settings of an account.
37+
rpc GetAutofeedSettings(GetAutofeedSettingsRequest)
38+
returns (AutofeedSettings) {
39+
option (google.api.http) = {
40+
get: "/accounts/v1beta/{name=accounts/*/autofeedSettings}"
41+
};
42+
option (google.api.method_signature) = "name";
43+
}
44+
45+
// Updates the autofeed settings of an account.
46+
rpc UpdateAutofeedSettings(UpdateAutofeedSettingsRequest)
47+
returns (AutofeedSettings) {
48+
option (google.api.http) = {
49+
patch: "/accounts/v1beta/{autofeed_settings.name=accounts/*/autofeedSettings}"
50+
body: "autofeed_settings"
51+
};
52+
option (google.api.method_signature) = "autofeed_settings,update_mask";
53+
}
54+
}
55+
56+
// Collection of information related to the
57+
// [autofeed](https://support.google.com/merchants/answer/7538732) settings.
58+
message AutofeedSettings {
59+
option (google.api.resource) = {
60+
type: "merchantapi.googleapis.com/AutofeedSettings"
61+
pattern: "accounts/{account}/autofeedSettings"
62+
plural: "autofeedSettings"
63+
singular: "autofeedSettings"
64+
};
65+
66+
// Identifier. The resource name of the autofeed settings.
67+
// Format: `accounts/{account}/autofeedSettings`.
68+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
69+
70+
// Required. Enables or disables product crawling through the autofeed for the
71+
// given account. Autofeed accounts must meet [certain
72+
// conditions](https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience),
73+
// which can be checked through the `eligible` field.
74+
// The account must **not** be a marketplace.
75+
// When the autofeed is enabled for the first time, the products usually
76+
// appear instantly. When re-enabling, it might take up to 24 hours for
77+
// products to appear.
78+
bool enable_products = 2 [(google.api.field_behavior) = REQUIRED];
79+
80+
// Output only. Determines whether merchant is eligible for being enrolled
81+
// into an autofeed.
82+
bool eligible = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
83+
}
84+
85+
// Request message for the `GetAutofeedSettings` method.
86+
message GetAutofeedSettingsRequest {
87+
// Required. The resource name of the autofeed settings.
88+
// Format: `accounts/{account}/autofeedSettings`
89+
string name = 1 [
90+
(google.api.field_behavior) = REQUIRED,
91+
(google.api.resource_reference) = {
92+
type: "merchantapi.googleapis.com/AutofeedSettings"
93+
}
94+
];
95+
}
96+
97+
// Request message for the `UpdateAutofeedSettings` method.
98+
message UpdateAutofeedSettingsRequest {
99+
// Required. The new version of the autofeed setting.
100+
AutofeedSettings autofeed_settings = 1
101+
[(google.api.field_behavior) = REQUIRED];
102+
103+
// Required. List of fields being updated.
104+
google.protobuf.FieldMask update_mask = 2
105+
[(google.api.field_behavior) = REQUIRED];
106+
}

0 commit comments

Comments
 (0)